mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 16:48:59 -04:00
enh(a11y): Always visible file rename label
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
ffe29518e8
commit
e9fd37507f
1 changed files with 9 additions and 1 deletions
|
|
@ -70,7 +70,7 @@
|
|||
class="files-list__row-rename"
|
||||
@submit.prevent.stop="onRename">
|
||||
<NcTextField ref="renameInput"
|
||||
:aria-label="t('files', 'File name')"
|
||||
:label="renameLabel"
|
||||
:autofocus="true"
|
||||
:minlength="1"
|
||||
:required="true"
|
||||
|
|
@ -479,6 +479,14 @@ export default Vue.extend({
|
|||
return this.source.attributes.favorite === 1
|
||||
},
|
||||
|
||||
renameLabel() {
|
||||
const matchLabel: Record<FileType, string> = {
|
||||
[FileType.File]: t('files', 'File name'),
|
||||
[FileType.Folder]: t('files', 'Folder name'),
|
||||
}
|
||||
return matchLabel[this.source.type]
|
||||
},
|
||||
|
||||
isRenaming() {
|
||||
return this.renamingStore.renamingNode === this.source
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue