Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(menubar): Add aria-selected and aria-activedescendant to menu bar items (fix #3911) #4888

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}`"

Check warning on line 41 in src/components/Menu/ActionList.vue

View workflow job for this annotation

GitHub Actions / eslint

Attribute ":id" should go before ":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
Loading