Skip to content

Commit dbfbbd0

Browse files
committed
fix(files): fixed home aria-label and desc logic
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
1 parent 701c1a9 commit dbfbbd0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apps/files/src/components/BreadCrumbs.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
dir="auto"
3232
:to="section.to"
3333
:title="titleForSection(index, section)"
34-
:aria-description="ariaForSection(index, section)"
34+
:aria-description="ariaForSection(section)"
35+
:aria-label="index === 0 ? section.name : null"
3536
@click.native="onClick(section.to)">
3637
<template v-if="index === 0" #icon>
3738
<Home :size="20"/>
@@ -103,7 +104,7 @@ export default defineComponent({
103104
return {
104105
dir,
105106
exact: true,
106-
name: this.getDirDisplayName(dir),
107+
name: t('files', this.getDirDisplayName(dir)),
107108
to,
108109
}
109110
})
@@ -142,8 +143,8 @@ export default defineComponent({
142143
return null
143144
},
144145
145-
ariaForSection(index, section) {
146-
if (index === section.length - 1) {
146+
ariaForSection(section) {
147+
if (section?.to?.query?.dir === this.$route.query.dir) {
147148
return t('files', 'Reload current directory')
148149
}
149150
return null

0 commit comments

Comments
 (0)