Skip to content

Commit

Permalink
fix(NcActions): provide a label in dialog role
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Feb 26, 2024
1 parent 55644fc commit 844cbc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,7 @@ export default {
},
})
)
const triggerRandomId = `${this.randomId}-trigger`
return h('NcPopover',
{
ref: 'popover',
Expand Down Expand Up @@ -1766,6 +1767,7 @@ export default {
slot: 'trigger',
ref: 'menuButton',
attrs: {
id: triggerRandomId,
'aria-label': this.menuName ? null : this.ariaLabel,
// 'aria-controls' should only present together with a valid aria-haspopup
'aria-controls': this.opened && this.config.popupRole ? this.randomId : null,
Expand Down Expand Up @@ -1798,7 +1800,8 @@ export default {
id: this.randomId,
tabindex: '-1',
role: this.config.popupRole,
// TODO: allow to provide dialog aria-label
// Dialog must have a label
'aria-labelledby': this.actionsMenuSemanticType === 'dialog' ? triggerRandomId : undefined,
},
}, [
actions,
Expand Down

0 comments on commit 844cbc7

Please sign in to comment.