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

Aria Roles on Phosphor Menu Widgets #1

Open
zorkow opened this issue May 15, 2019 · 1 comment
Open

Aria Roles on Phosphor Menu Widgets #1

zorkow opened this issue May 15, 2019 · 1 comment

Comments

@zorkow
Copy link
Collaborator

zorkow commented May 15, 2019

Problem: Roles missing

Proposed Solution:

  • Add a method for adding roles in widget class
  • Add roles in the menu/item classes.
@sinabahram
Copy link
Collaborator

General strategy, just to make sure we're on the same page.

  • High level div containing the whole menu gets role="menubar"
  • Individual children that instantiate menus e.g. file, edit, run, etc. get role="menuitem" not role="menu" (this is critical)
  • The ul for a "file" or "edit" or "run", then gets role="menu"
  • Children at any level get role="menuitem", so the link that says "file" and then individual children of "file" all get role="menuitem".
  • If something like file has children, which it does, it gets aria-haspopup="true" to indicate it has children e.g. that it is a submenu.
  • If something is a parent, again like "file", "edit", "run", etc. then they also need an aria-expanded="false" when they are collapsed and aria-expanded="true" on it being expanded. Note please, that the initial state needs to have aria-expanded="false" and then JS can togle these states back and forth. Often times the initial value of aria-expanded is left off.

@zorkow zorkow mentioned this issue May 16, 2019
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

No branches or pull requests

2 participants