WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Custom tabs with a single tab panel: does it poseaccessibility issues?

for

From: tim.harshbarger
Date: Aug 1, 2023 9:37AM


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