E-mail List Archives
Re: Custom tabs with a single tab panel: does it poseaccessibility issues?
From: tim.harshbarger@deque.com
Date: Aug 1, 2023 9:37AM
- Next message: glen walker: "Re: Custom tabs with a single tab panel: does it pose accessibility issues?"
- Previous message: Matson, Eric (ecmatson@uidaho.edu): "Re: WCAG 4.1.3 - Status Messages"
- Next message in Thread: glen walker: "Re: Custom tabs with a single tab panel: does it pose accessibility issues?"
- Previous message in Thread: Steve Green: "Re: Custom tabs with a single tab panel: does it poseaccessibility issues?"
- View all messages in this Thread
It should be OK to do that.
There may be a difference in the implementation.
In a situation where all the tab panels exist in the DOM, you can set the aria-controls attribute to point to the relevant tab panel for each tab.
In a situation where the tab panels only exist in the DOM when a tab is selected, you will want to add an aria-controls attribute only to the currently selected tab.
Thanks,
Tim
-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Erick Wilder
Sent: Tuesday, August 1, 2023 2:36 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [WebAIM] Custom tabs with a single tab panel: does it pose accessibility issues?
Hello everyone,
Iâve come across many implementations of a custom tab and tab panels. Most of them uses a combination of multiple elements in the DOM, each tab assigning a aria-controls attribute to a different ID of an element with role=tabpanel
With frameworks and libraries like React it is often the case that elements are not simply removed from the accessibility tree (e.g using display:
none, or aria-hidden attribute) but elements are removed from the DOM
I have come across this implementation of a tab and tab panel that uses a single tab panel, and conditionally removes and assigns the aria-controls attribute to the currently selected tab (e.g. aria-selected=true).
I wonder if this may pose accessibility issues because the contents of the element with role=tabpanel and the aria-controls attribut of the tabs change programmatically. Is my concern valid? Is it better to stick to multiple tab panels, each with its unique id and use CSS to remove the inactive ones from the accessibility tree?
Thanks and have a great week.
--
Enviado do Gmail para celular
- Next message: glen walker: "Re: Custom tabs with a single tab panel: does it pose accessibility issues?"
- Previous message: Matson, Eric (ecmatson@uidaho.edu): "Re: WCAG 4.1.3 - Status Messages"
- Next message in Thread: glen walker: "Re: Custom tabs with a single tab panel: does it pose accessibility issues?"
- Previous message in Thread: Steve Green: "Re: Custom tabs with a single tab panel: does it poseaccessibility issues?"
- View all messages in this Thread