WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: What's the point of aria-expanded on a menu button?

for

From: Steve Green
Date: Nov 15, 2023 11:34AM


It's worth noting that the APG menu design works as expected with JAWS and Chrome, but the behaviour with NVDA 2023 is entirely different and you can indeed navigate out of the dropdown menu while it is still open. Curiously, NVDA only announces the expanded state of the menu button the first time it is used to open the menu. Thereafter, the state is not announced.

I don't know if this non-modality is a bug in NVDA or a flaw in the design.

And on a slightly different topic, why does the APG contain a design for a navigation menu using "menubar"? The ARIA specification explicitly states that "menubar" is for desktop style web applications, not for navigation. We have an endless fight to stop developers using "menubar" for navigation menus, and it doesn't help for the APG to undermine us like this.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Patrick H. Lauke
Sent: Wednesday, November 15, 2023 6:10 PM
To: <EMAIL REMOVED>
Subject: Re: [WebAIM] What's the point of aria-expanded on a menu button?



On 15/11/2023 17:13, Jonathan Michael Bodnar via WebAIM-Forum wrote:
> From a component design perspective the button to toggle the menu would be external to the collapsible region of the menu, or external to the menu, and reachable regardless of the menu state. The aria-expanded attribute indicates the state of the menu the button controls.

But a proper menu sets focus to the first menu item when the menu is opened, and if you try to tab/move out of the menu, the menu is closed again. So you don't normally encounter the menu button itself while the menu is also opened. Which is why it's, in practice, redundant (unless you're doing something unusual and *don't* autoclose the menu when moving out of it, which sounds...odd; or if you're actually opening something that isn't a menu as such, but more like a disclosure widget?)

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke https://flickr.com/photos/redux/ | https://www.deviantart.com/redux https://mastodon.social/@patrick_h_lauke | skype: patrick_h_lauke