-
Notifications
You must be signed in to change notification settings - Fork 344
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
Menu Button Pattern: Change to specify aria-expanded="false" when menu is not visible #2829
Conversation
The task force agreed to move forward with this change in the October 3, 2023 meeting. This PR revises the menu button pattern and the PR that resolves #2834 will make the example code match the revised pattern guidance. |
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.
great change - much easier to read and understand by clearly defining the case of false state
@@ -56,8 +56,7 @@ <h2>WAI-ARIA Roles, States, and Properties</h2> | |||
<li>The element with role <code>button</code> has <a href="#aria-haspopup" class="property-reference">aria-haspopup</a> set to either <code>menu</code> or <code>true</code>.</li> | |||
<li> | |||
When the menu is displayed, the element with role <code>button</code> has <a href="#aria-expanded" class="state-reference">aria-expanded</a> set to <code>true</code>. | |||
When the menu is hidden, it is recommended that <code>aria-expanded</code> is not present. | |||
If <code>aria-expanded</code> is specified when the menu is hidden, it is set to <code>false</code>. | |||
When the menu is hidden, <code>aria-expanded</code> is set to <code>false</code>. |
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 editorial change makes the point concise and clear. Great!
Regarding test review: below test id are missing.
|
Adding this change to #2839. Closing. |
To resolve #697, remove the recommendation that aria-expanded be removed when the controlled menu is hidden. Instead, specify that aria-expanded should be set to false. See also #2808.
Preview Link
Preview revised roles, states, and properties section of menu button pattern
Review checklist
Reviewers: To learn what needs to be covered by each review, Follow the link for the type of review to which you are assigned.
WAI Preview Link (Last built on Mon, 02 Oct 2023 01:42:57 GMT).