Bug 481468

Summary: User Menu items need role "menuitem" to have complete semantics
Product: [ECD] Orion (Archived) Reporter: Carolyn MacLeod <Carolyn_MacLeod>
Component: ClientAssignee: Carolyn MacLeod <Carolyn_MacLeod>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti
Version: unspecifiedKeywords: accessibility
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/59705
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=054b4def34ddef83db24ae948780cc9056ab8737
Whiteboard:

Description Carolyn MacLeod CLA 2015-11-05 00:25:51 EST
The User Menu (aka Options menu - the one with the person icon) has a role of "menu", but the elements it contains do not have role "menuitem".
Assistive Technology can't understand what this is because the semantic structure of the menu is incomplete.
Comment 1 Carolyn MacLeod CLA 2015-11-05 00:35:20 EST
There are 2 different types of menu item in the User Menu:
1) link menu items, which are created in UserMenu.js
2) and span (aka 'text') menu items, which are created in dropdown.js.

It turns out that the code did attempt to set the role to "menuitem" in both cases, but the code was:
  element.role = "menuitem";

However, that unfortunately doesn't work (yet) because "role" is a non-standard attribute. So the code needs to be:
  element.setAttribute("role", "menuitem");
Comment 2 Eclipse Genie CLA 2015-11-05 00:46:03 EST
New Gerrit change created: https://git.eclipse.org/r/59705
Comment 3 Carolyn MacLeod CLA 2015-11-05 01:06:30 EST
A search for .role shows that there are 6 other places where element.role is used.
These need to be changed to element.setAttributes("role", "the-role");
Opened separate bug 481470 to fix the other places.
Comment 5 Carolyn MacLeod CLA 2015-11-06 15:23:48 EST
Fixed.