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 a menuitem labeling omission in the menu pattern #215

Closed
mcking65 opened this issue Dec 12, 2016 · 11 comments
Closed

Fix a menuitem labeling omission in the menu pattern #215

mcking65 opened this issue Dec 12, 2016 · 11 comments
Assignees
Labels
bug Code defects; not for inaccurate prose Pattern Page Related to a page documenting a Pattern

Comments

@mcking65
Copy link
Contributor

mcking65 commented Dec 12, 2016

NOTE: This was later pointed out to be incorrect and reversed in issue #395.

If a menuitem element contains or owns a child menu and its menuitems, then the menuitem needs either aria-label or aria-labelledby similar to what is described for treeitems. This is not covered in the roles, states, and properties section of the menu design pattern.

The editor menubar example demonstrates this situation.

@mcking65 mcking65 added bug Code defects; not for inaccurate prose documentation labels Dec 12, 2016
@mcking65 mcking65 added this to the 1.1 PR milestone Dec 12, 2016
@mcking65 mcking65 changed the title Better address menuitem labeling in the menu pattern Fix a menuitem labeling omission in the menu pattern Dec 12, 2016
@mcking65 mcking65 modified the milestones: Feb 2017 Heartbeat Draft, 1.1 PR Jan 7, 2017
@mcking65 mcking65 added the Pattern Page Related to a page documenting a Pattern label Jan 25, 2017
mcking65 added a commit that referenced this issue Jan 31, 2017
modified the menu pattern section of aria-practices.html.

For issue #215, modified states and properties subsection:
* Added a statement that parent menuitems contain their submenu.
* Added statement that parent menuitems are labeled with aria-label or aria-labelledby.
* Simplified aria-haspopup statement to use parent menuitem terminology.

For issue #261, modified states and properties subsection:
* Added a  statement for aria-orientation of menubar.
* Added a  statement for aria-orientation of menu.
@mcking65
Copy link
Contributor Author

Proposed fix for this issue can be seen in a branch in rawgit at:

Changes include:

  • Added statement: "If activating a menuitem opens a submenu, the menuitem is known as a parent menuitem. A submenu's menu element is contained in or owned by it's parent menuitem."
  • Added statement: "A parent menuitem has either aria-label or aria-labelledby set to specify a label. Warning: parent menuitems missing a label are labeled by all child elements, causing screen readers to announce every child menuitem and often making a menu so verbose that it is unusable."
  • Simplified statement to use parent menuitem terminology: "A parent menuitem has aria-haspopup set to true."

@mcking65
Copy link
Contributor Author

@annabbott, @jnurthen,

Please review the proposed fix for this issue, which can be seen in a branch in rawgit at:
https://rawgit.com/w3c/aria-practices/menu-issues-215-261/aria-practices.html#menu

Changes include:

  • Added statement: "If activating a menuitem opens a submenu, the menuitem is known as a parent menuitem. A submenu's menu element is contained in or owned by it's parent menuitem."
  • Added statement: "A parent menuitem has either aria-label or aria-labelledby set to specify a label. Warning: parent menuitems missing a label are labeled by all child elements, causing screen readers to announce every child menuitem and often making a menu so verbose that it is unusable."
  • Simplified statement to use parent menuitem terminology: "A parent menuitem has aria-haspopup set to true."

@annabbott
Copy link

See my comment in #261.

Under Keyboard interaction > Down arrow > as last bullet:
When focus is in a menubar, does nothing.

Under Keyboard interaction > Escape
Escape: Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.
Suggest removing reference to 'menu button' and replace with 'menu'.

@mcking65
Copy link
Contributor Author

mcking65 commented Feb 3, 2017

Ann, for this fix I didn't change the keyboard subsection. I changed only the above mentioned bullets in the states and properties.

Nonetheless, to address your specific concern ...

@annabbott wrote:

Under Keyboard interaction > Down arrow > as last bullet:
When focus is in a menubar, does nothing.
Under Keyboard interaction > Escape
Escape: Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.
Suggest removing reference to 'menu button' and replace with 'menu'.

We don't want to say to return focus to a menu. A menu does not receive focus. If it ever receives DOM focus, then it needs to be using aria-activedescendant to place AX focus on a menuitem.

There are two ways of opening an ARIA menu:

  1. Open it by activating a menuitem.
  2. open it by activating a menubutton.

Note that a menuitem must be in either a menubar or a parent menu.

@annabbott
Copy link

ok

@jnurthen
Copy link
Member

jnurthen commented Feb 4, 2017

Modify the 2nd change to the following:
If a parent menu has descendent items in the DOM then set a label on the parent using aria-label or aria-labelledby. Parent menuitems with descendent menuitems missing a label are labeled by all child elements, causing screen readers to announce every child menuitem and often making a menu so verbose that it is unusable. If using aria-owns this is not necessary.

@mcking65
Copy link
Contributor Author

mcking65 commented Feb 4, 2017

@jnurthen, good catch about aria-owns. I didn't realize the name calculation treated owned elements differently from contained elements when naming from content. You're 100% sure on this? I wonder if the browser tests for name calculation test for this.

@jnurthen
Copy link
Member

jnurthen commented Feb 4, 2017 via email

@mcking65
Copy link
Contributor Author

mcking65 commented Feb 9, 2017

This issue depends on issue #277.

@mcking65
Copy link
Contributor Author

I am going to merge these changes and close this issue. If the outcome of issue #277 calls for more changes, thenI will make them at that time.

mcking65 added a commit that referenced this issue Feb 15, 2017
modified the menu pattern section of aria-practices.html.

For issue #215, modified states and properties subsection:
* Added a statement that parent menuitems contain their submenu.
* Added statement that parent menuitems are labeled with aria-label or aria-labelledby.
* Simplified aria-haspopup statement to use parent menuitem terminology.

For issue #261, modified states and properties subsection:
* Added a  statement for aria-orientation of menubar.
* Added a  statement for aria-orientation of menu.
@mcking65
Copy link
Contributor Author

Changes merged. Note that I made an error in the title of commit cbe304b. It says it is for issues 2155 and 266. It should say it is for issues 215 and 261. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code defects; not for inaccurate prose Pattern Page Related to a page documenting a Pattern
Development

No branches or pull requests

3 participants