WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Announcing sub menu levels

for

From: Birkir R. Gunnarsson
Date: Nov 1, 2019 9:07PM


I find this whole setup kind of weird. Why does the user care how many
levels deep he/she is, as opposed to what menu are they in?
If you have submenus of appetizers and desserts, second level menus of
meat, seafood and cheese for the appetizers and then individual
appetizers, wouldn't it be more useful to know that the moldy medley
is a submenu of cheeses, as opposed to the third level menu?
You could strip away all the ARIA semantics and just use list markup
with aria-level to indicate nesting (though if you do the nesting
properly you should get the proper level announcements), you can add
aria-label or aria-labelledby to <ul> elements, they are announced by
most screen readers.
You can go super aria and use aria-labelledby with the mneu roles and
aria-label to refer to self, e.g.
...
<li role="menuitem" id="l2m">Meat</li>

<ul role="menu" aria-label="level 3" id="l3" aria-labelledby="l2m l3">

but does the user really care how many levels deep he/she is?




On 11/1/19, <EMAIL REMOVED> < <EMAIL REMOVED> > wrote:
> Would the aria-label be the correct tag why not aria-description?
>
>