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

Menu Button Pattern: Change to specify aria-expanded="false" when menu is not visible #2829

Closed
wants to merge 1 commit into from

Conversation

mcking65
Copy link
Contributor

@mcking65 mcking65 commented Oct 2, 2023

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).

@mcking65
Copy link
Contributor Author

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.

Copy link
Contributor

@a11ydoer a11ydoer left a 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>.
Copy link
Contributor

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!

@a11ydoer
Copy link
Contributor

a11ydoer commented Nov 3, 2023

Regarding test review: below test id are missing.

  • menu-button/examples/menu-button-actions-active-descendant.html:
    • menu-up-arrow
    • menu-down-arrow
    • menu-home
    • menu-character
  • menu-button/examples/menu-button-links.html:
    • menu-enter

@mcking65
Copy link
Contributor Author

Adding this change to #2839. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discuss removing recommendation in menubutton pattern to add/remove aria-expanded="true
2 participants