Skip to content

[Tabs] Accessibility improvments#2942

Open
renow-luxembourg wants to merge 2 commits intoadobe:mainfrom
renow-luxembourg:renow_fix_tabs
Open

[Tabs] Accessibility improvments#2942
renow-luxembourg wants to merge 2 commits intoadobe:mainfrom
renow-luxembourg:renow_fix_tabs

Conversation

@renow-luxembourg
Copy link
Contributor

@renow-luxembourg renow-luxembourg commented May 13, 2025

Feature Request

Is your feature request related to a problem? Please describe.
In a recent accessibility audit, it was observed that the Tabs component does not follow the structure of the W3C design pattern : Tabs indicator should use the "button" tag with the role="tab" (element with"button" tag already have an implicit "tabindex" and natively support the enter/space keyboard activation)

To take into account the case of multiple tabs (or tabs with a long text content), we organized some user test. It seems that it's better to have all the tabs in one row in desktop and mobile with an horizontal scroll. To fix-it, we also add a tabindex="0" attribute on the tablist container and we do a small improvement to the CSS file.

We are also thinking about adding an "Orientation" parameter to describe if the tablist will be displayed horizontally or vertically ( branch also available on github)

Q                       A
Fixed Issues?
Patch: Bug Fix?
Minor: New Feature? Yes
Major: Breaking Change?
Tests Added + Pass? Yes
Documentation Provided Yes (code comments and or markdown)
Any Dependency Changes?
License Apache License, Version 2.0

Environment
AEM 6.5
Core Components version 2.28.0

Documentation
We have to implement the properties specified in the design pattern of tabs :
https://www.w3.org/WAI/ARIA/apg/patterns/tabs/

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@vladbailescu
Copy link
Member

@renow-luxembourg , thank you for submitting this PR! Since this changes the HTML elements for the tabs, it is a breaking change for existing implementations and can only be considered for a future version of the Tabs component.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants