Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-menu accessibility (role=menu, role=menuitem not there) #4415

Closed
ghost opened this issue Sep 1, 2015 · 4 comments
Closed

md-menu accessibility (role=menu, role=menuitem not there) #4415

ghost opened this issue Sep 1, 2015 · 4 comments
Labels
a11y This issue is related to accessibility resolution: fixed
Milestone

Comments

@ghost
Copy link

ghost commented Sep 1, 2015

I'm new to accessibility so I might be wrong here, but I was inspecting the DOM elements of md-menu and its md-menu-items on https://material.angularjs.org/latest/#/demo/material.components.menu and was expecting to find menu related aria attributes:

role=menu
role=menuitem

I didn't see these anywhere. Should they be?

@ghost ghost changed the title md-menu accessibility (role=menu, role=menuitem) md-menu accessibility (role=menu, role=menuitem not there) Sep 1, 2015
@ThomasBurleson ThomasBurleson modified the milestone: 0.12.0 Sep 2, 2015
@marcysutton
Copy link
Contributor

It uses aria-haspopup to indicate the trigger button has an accompanying menu (which is in a separate part of the DOM), but it only goes part of the way there. The menu component needs more semantics to identify the menu items, and to bind more of a relationship between the trigger button and the menu (using aria-controls=menuId, since the DOM structure won't be hierarchal). One thing to pay attention to is that the markup may need to be present in the DOM at all times for assistive technology, rather than generated on user interaction (a buffer/race condition). Here is a demo that uses hierarchal DOM instead of aria-controls on the trigger button: http://oaa-accessibility.org/example/25/

@rschmukler I can help you test it since this one will probably be tricky.

@rschmukler rschmukler added a11y This issue is related to accessibility priority: high labels Sep 10, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc1, 1.0-rc2, 1.0-rc3 Oct 27, 2015
@rschmukler rschmukler modified the milestones: 1.0-rc4, 1.0-rc3 Nov 4, 2015
@rschmukler rschmukler modified the milestones: 1.0-rc5, 1.0-rc4 Nov 11, 2015
@rschmukler rschmukler modified the milestones: 1.0-rc6, 1.0-rc5 Nov 20, 2015
@marcysutton
Copy link
Contributor

I forgot that Menus have to support links, something that isn't supported by the ARIA menu/menuitem roles (nor do they support text inputs in menus, as another example). For that reason, Menubar should behave more like Menu, using aria-haspopup="true" and eliminating role=menuitem. Once the menu items are hierarchal children of the menu at load time, it will have the required semantics (so aria-owns won't be required).

@antrez770
Copy link

Hi how create Accessibility menu in Angular?

@Splaktar
Copy link
Member

@antrez770 please try asking on Stack Overflow, Gitter, or the AngularJS Material forums.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility resolution: fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants