Skip to content

Commit

Permalink
Merge pull request #4447 from nextcloud-libraries/enh/a11y/remove-ari…
Browse files Browse the repository at this point in the history
…a-label

Prevent accessible name conflicts on action menu
  • Loading branch information
raimund-schluessler committed Aug 23, 2023
2 parents 07be85b + 17465a3 commit ad61a14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/NcActions/NcActions.vue
Expand Up @@ -670,7 +670,11 @@ export default {
},
/**
* Aria label for the actions menu
* Aria label for the actions menu.
*
* If `menuName` is defined this will not be used to prevent
* any accessible name conflicts. This ensures that the
* element can be activated via voice input.
*/
ariaLabel: {
type: String,
Expand Down Expand Up @@ -1114,7 +1118,7 @@ export default {
ref: 'menuButton',
attrs: {
'aria-haspopup': isNav ? null : 'menu',
'aria-label': this.ariaLabel,
'aria-label': this.menuName ? null : this.ariaLabel,
'aria-controls': this.opened ? this.randomId : null,
'aria-expanded': this.opened.toString(),
},
Expand Down

0 comments on commit ad61a14

Please sign in to comment.