-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[a11y] Fix: aria-haspop and aria-expanded attributes on list view button. #53693
[a11y] Fix: aria-haspop and aria-expanded attributes on list view button. #53693
Conversation
Size Change: +10 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good but please remove aria-haspopup
. This is used incorrectly here.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup
In ARIA, interactive menus, listboxes, trees, grids, and dialogs that appear on top of other content when triggered to appear are considered "popups".
@@ -265,6 +265,8 @@ export default function HeaderEditMode() { | |||
? 'tertiary' | |||
: undefined | |||
} | |||
aria-haspopup="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this attribute.
@@ -107,6 +107,8 @@ function HeaderToolbar() { | |||
shortcut={ listViewShortcut } | |||
showTooltip={ ! showIconLabels } | |||
variant={ showIconLabels ? 'tertiary' : undefined } | |||
aria-haspopup="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this attribute.
d419080
to
3751564
Compare
Thank you for the review @alexstine, the feedback was applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🚢
Part of #24796.
Currently, the list view button opens an additional UI (list view sidebar) but lacks aria-haspopup and aria-expanded tags. This PR addresses the issue.
Presently, the publish and sidebar buttons also trigger sidebars and already possess these attributes, ensuring this PR maintains uniformity across both elements.
A similar PR has been suggested for the inserter button at #53692.
Testing