aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry.vue
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-28 12:35:37 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-29 11:05:52 -0700
commite9fd37507f6fe4cb60368b8a3de926ba4ea6c0ab (patch)
tree2aae4d2145cdf36904ed1645b4a5428724dde4b0 /apps/files/src/components/FileEntry.vue
parentffe29518e88f1262ef73b25c9dbd3152ba8a78af (diff)
downloadnextcloud-server-e9fd37507f6fe4cb60368b8a3de926ba4ea6c0ab.tar.gz
nextcloud-server-e9fd37507f6fe4cb60368b8a3de926ba4ea6c0ab.zip
enh(a11y): Always visible file rename label
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files/src/components/FileEntry.vue')
-rw-r--r--apps/files/src/components/FileEntry.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index 9471e596f1d..216d6bf2cd5 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -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
},