WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Carousels again

for

From: Steve Green
Date: Jul 16, 2020 6:15AM


You beat me to it - I was about to say exactly the same thing.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of <EMAIL REMOVED>
Sent: 16 July 2020 13:13
To: 'WebAIM Discussion List' < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Carousels again

I would disagree with Glen (and others) on the use of a complementary landmark over region landmark (with a label).

The ARIA spec has said and continues to say:

"complementary (role)

A landmark that is designed to be complementary to the main content at a similar level in the DOM hierarchy, but remaining meaningful when separated from the main content."

https://www.w3.org/TR/wai-aria-1.2/#complementary

" at a similar level in the DOM hierarchy, but remaining meaningful when separated from the main content" to me has always indicated that a complementary landmark should not be contained in the main landmark since it should be "at a similar level in the DOM hierarchy" and be reusable on multiple pages.

So if the carousel content is inside the main landmark, complementary should not be used, instead region or section with a label would be the correct choice for a landmark.

Joe Humbert

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of glen walker
Sent: Wednesday, July 15, 2020 2:11 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Carousels again

role="region" is usually the last choice for a landmark because it's so generic. It's kind of the <div> of landmarks. role="complementary" has more semantic meaning so is preferable but technically you could use either.

Note that role="region" is often ignored as a landmark unless it also has an aria-label.

You can see more about the complementary landmark at https://www.w3.org/TR/wai-aria/#complementary

Barry, in your original posting, you said next/prev would be disabled if at the end/beginning of the carousel. While it's common to disable those when at the end of a list, most carousels wrap around to the beginning/end if you try to next/prev at the end, thus eliminating the need to disable them.


On Wed, Jul 15, 2020 at 8:19 AM Mohith BP < <EMAIL REMOVED> > wrote:

> Hi Birkir,
>
> Please help me to understand is there any specific reason to use
> role="complementary"?
> If the carousel is in the main section can role="region" be used
> instead of role="complementary"?
>
> Just curious to know if there are any specific reasons.
>
> Thanks & Regards,
> Mohith B. P.
>
>