WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Jon Gunderson
Date: Nov 29, 2023 9:36AM


The use of `aria-expanded` on menu button is to support touch-based screen
readers, see the following discussion for details:
https://github.com/w3c/aria-practices/issues/2808

Jon


On Mon, Nov 20, 2023 at 11:53 AM Jon Gunderson < <EMAIL REMOVED> >
wrote:

> There is currently an open issue related to `aria-expanded` in the ARIA
> APG, to also require it to be set to `false` when the menu is closed. It
> would be a good place to raise the question of usefulness, so iit's purpose
> could be more fully explained. The APG pays attention to external comments
> that are raised in issues, so I encourage you to comment.
>
> [Issue #2834: Revise menu button examples to declare aria-expanded="false"
> when collapsed](https://github.com/w3c/aria-practices/issues/2834)
>
>
> On Wed, Nov 15, 2023 at 8:15 PM Bryan Garaventa <
> <EMAIL REMOVED> > wrote:
>
>> Hi,
>> Typically it's not that useful to have aria-expanded on a standalone menu
>> button, but it is, however, very useful on a menu item within a menu.
>>
>> The value isn't necessarily with keyboard navigable screen readers like
>> JAWS and NVDA, but rather with touch-based screen readers like VoiceOver on
>> iOS. You can try this out here:
>> https://whatsock.com/Templates/Menus/Internal/index.htm
>>
>> The expanded state is announced so that the submenu list hierarchy is
>> clear during touch navigation.
>>
>> All the best,
>> Bryan
>>
>>
>>