feat(menu): add disableClose option#4842
Conversation
* Adds the ability to prevent users from closing a menu via the `disableClose` option. * Fixes an exception that was being thrown when tabbing through menu items multiple times.
|
I believe this fixes #2612 |
|
Chatted w/ @kara about this and we decided that we don't want to add this as a feature to md-menu. This is largely because turning it on would be detrimental to the a11y experience (see https://www.w3.org/TR/wai-aria-practices-1.1/#menu), and we want to generally avoid adding APIs that go counter to a11y best practices. |
|
That link (https://www.w3.org/TR/wai-aria-practices-1.1/#menu) doesn't seem to indicate that we are not allowed to retain the menu when we click one of its child menus. On the contrary, the last statement below is an indication that it is allowed. "A menu is usually opened, or made visible, by activating a menu button, choosing an item in a menu that opens a sub menu, or by invoking a command, such as Shift + F10 in Windows, that opens a context specific menu. When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu." |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
disableCloseoption.