Skip to content

Commit

Permalink
Merge pull request #4888 from nextcloud/a11y/toolbar2
Browse files Browse the repository at this point in the history
fix(menubar): Add aria-selected and aria-activedescendant to menu bar items (fix #3911)
  • Loading branch information
juliusknorr authored Oct 20, 2023
2 parents b8e54e5 + 15ae86a commit 052cf54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Menu/ActionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
v-bind="state"
:container="menuIDSelector"
:aria-label="actionEntry.label"
:aria-activedescendant="currentChild ? `${$menuID}-child-${currentChild.key}` : null"
:force-menu="true"
:name="actionEntry.label"
:data-text-action-entry="actionEntry.key"
Expand All @@ -37,6 +38,7 @@
</template>
<ActionSingle v-for="child in children"
:key="`child-${child.key}`"
:id="`${$menuID}-child-${child.key}`"
is-item
:action-entry="child"
v-on="$listeners"
Expand Down
1 change: 1 addition & 0 deletions src/components/Menu/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const getActionState = (actionEntry, $editor) => {
disabled: isDisabled(actionEntry, $editor),
class: getEntryClasses(actionEntry, active),
active,
'aria-selected': active,
}
}

Expand Down

0 comments on commit 052cf54

Please sign in to comment.