Skip to content

Commit d7a3717

Browse files
committed
fix(files): proper accessible row name and title for overflow
- resolves #59203 - resolves #56611 In the files list before this the accessible name of the button (default action) was overridden to the default action display name. But this causes problem for screen readers because then the whole table row is just called "view" or "download" instead of using the inner text (e.g. "filename.txt"). This fixes it to rename it `ACTION: FILENAME` instead. Also when long names were truncated there were no useful title (tooltip) for it, so it was not possible to get the real name. This is fixed by always provide a proper tooltip including the full name. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent ae46190 commit d7a3717

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/files/src/components/FileEntry/FileEntryName.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default defineComponent({
136136
return {
137137
is: 'span',
138138
params: {
139-
title: t('files', 'This node is unavailable'),
139+
title: this.source.displayname + `(${t('files', 'unavailable')})`,
140140
},
141141
}
142142
}
@@ -148,11 +148,12 @@ export default defineComponent({
148148
folder: this.activeFolder!,
149149
contents: [],
150150
})
151+
const accessibleName = `${displayName}: ${this.source.displayname}`
151152
return {
152153
is: 'button',
153154
params: {
154-
'aria-label': displayName,
155-
title: displayName,
155+
'aria-label': accessibleName,
156+
title: accessibleName,
156157
tabindex: '0',
157158
},
158159
}

0 commit comments

Comments
 (0)