Skip to content

Commit f7b45b4

Browse files
Merge pull request #61930 from nextcloud/backport/bca2c7f2294a24daf7e45928c309e41dd2d98c1f
[stable34] fix(files): proper accessible row name and title for overflow
2 parents 251757b + d15dc6e commit f7b45b4

4 files changed

Lines changed: 9 additions & 8 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: t('files', '{displayName} (unavailable)', { displayName: this.source.displayname }),
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
}

cypress/e2e/files_external/files-external-failed.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('Files user credentials', { testIsolation: true }, () => {
4848
// Ensure the row is visible and marked as unavailable
4949
getRowForFile('Storage1').as('row').should('be.visible')
5050
cy.get('@row').find('[data-cy-files-list-row-name-link]')
51-
.should('have.attr', 'title', 'This node is unavailable')
51+
.should('have.attr', 'title', / \(unavailable\)$/)
5252

5353
// Ensure clicking on the location does not open the folder
5454
cy.location().then((loc) => {
@@ -74,7 +74,7 @@ describe('Files user credentials', { testIsolation: true }, () => {
7474
// Ensure the row is visible and marked as unavailable
7575
getRowForFile('Storage2').as('row').should('be.visible')
7676
cy.get('@row').find('[data-cy-files-list-row-name-link]')
77-
.should('have.attr', 'title', 'This node is unavailable')
77+
.should('have.attr', 'title', / \(unavailable\)$/)
7878

7979
// Ensure clicking on the location does not open the folder
8080
cy.location().then((loc) => {

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)