WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accordion Group and Role Region

for

From: glen walker
Date: Apr 28, 2023 4:00PM


Just be careful when you remove the list style via CSS, Apple considers the
element "not a list" anymore and you won't hear the metadata announced of
how many items are in the list, which was the whole point of adding a list.

Fortunately, you can work around it by adding the list role back to the
list. It looks unnecessary so make sure you comment your code accordingly.

<ul style="list-style-type: none;" role="list">


On Fri, Apr 28, 2023 at 8:28 AM < <EMAIL REMOVED> > wrote:

> Consider grouping the compartments of the accordion in a list!
> <ul style="list-style-type: none; " >
> Benefit:
> The screen reader announces the *number* of compartments in the accordion.
> Disadvantage (?):
> You cannot use aria-label on <ul>, so you have to put the accordion under
> a heading which might be a promising idea anyway. (The aria-label-content
> is only available for AT.)
>
> Wolfgang
>
>