From eab912624bdf11158a882b58b2b20b4bb4d30f20 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Fri, 20 Dec 2024 15:08:18 +0100 Subject: [PATCH] Tabs: add docs about not recommending usage with links --- packages/components/src/tabs/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/components/src/tabs/README.md b/packages/components/src/tabs/README.md index 9c7e846046c904..bb1185987cf924 100644 --- a/packages/components/src/tabs/README.md +++ b/packages/components/src/tabs/README.md @@ -95,6 +95,12 @@ const MyControlledTabs = () => ( ); ``` +#### Using `Tabs` with links + +The semantics implemented by the `Tabs` component don't align well with the semantics needed by a list of links. Furthermore, end users usually expect every link to be tabbable, while `Tabs.Tablist` is a [composite](https://w3c.github.io/aria/#composite) widget acting as a single tab stop. + +For these reasons, even if the `Tabs` component is fully extensible, we don't recommend using `Tabs` with links, and we don't currently provide any related Storybook example. + ### Components and Sub-components Tabs is comprised of four individual components: