You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DropdownMenu] Escape does not comply with ARIA authoring practices #1933
Escape: Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.
changed the title [-][DropdownMenu] Escape closes all submenus[/-][+][DropdownMenu] Escape does not comply with ARIA authoring practices[/+]on Feb 9, 2023
In many ways the aria practices aren't pure specs and also leave stuff to interpretation.
This is one of those cases I think.
Escape: Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.
One could interpret this both ways, ie. return to the top-level button OR the parent menuitem. It's not explicitly stated that it should be always menuitem for a submenu.
On top of this, as you point out in your PR #1964, MacOS doesn't behave like that.
Ultimately we took this approach for a few reasons:
submenus already have a key to wind down only the submenu (left arrow in LTR)
Activity
[-][DropdownMenu] Escape closes all submenus[/-][+][DropdownMenu] Escape does not comply with ARIA authoring practices[/+][Menu] Only close one submenu per escape keypress…
benoitgrelard commentedon Mar 16, 2023
Hey @dkeele,
In many ways the aria practices aren't pure specs and also leave stuff to interpretation.
This is one of those cases I think.
One could interpret this both ways, ie. return to the top-level button OR the parent menuitem. It's not explicitly stated that it should be always menuitem for a submenu.
On top of this, as you point out in your PR #1964, MacOS doesn't behave like that.
Ultimately we took this approach for a few reasons: