-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
According to the WCAG guide practices you can have a menu item have any of the following roles: menuitem
, menuitemradio
, or menuitemcheckbox
.
What is the current behavior?
Currently you can only have the default role of menuitem
which makes it difficult to support a single selected option. See Editor Menubar Example of a menu with menuitemradio
's.
For example if you wanted to create a menu that was used for sorting and shows the currently selected sorted option you need to make the menuitems behave like radios in order to be WCAG compliant.
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
https://stackblitz.com/edit/angular-d75nv1
What is the use-case or motivation for changing an existing behavior?
Allow greater support for different types of menus. This will allow you to have a menu that behaves with radios and checkboxes. This is also included in the WCAG Aria Practices examples.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.0.0
Is there anything else we should know?
Would be nice to also then set the selected option which would add aria-checked="true"
.