Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enh(a11y): Always visible file rename label
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Aug 29, 2023
commit e9fd37507f6fe4cb60368b8a3de926ba4ea6c0ab
10 changes: 9 additions & 1 deletion apps/files/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
},
Expand Down