Replies: 2 comments 4 replies
-
|
We've internally discussed this and lean towards deprecating the |
Beta Was this translation helpful? Give feedback.
-
|
hey @Sidnioulz 👋 at zeroheight we've developed a Storybook addon that shows design system documentation in a tab, alongside a component (see our docs for more info). removing tabs in Storybook 11 will mean that our addon no longer works as intended. we're on board with the accessibility and maintenance improvements that result from this change, but the lack of alternatives here might lead addon authors to develop solutions that create an inconsistent UI (or result in addons re-implementing tabs, which goes against the original goal of this RFC). do you have any recommended alternatives for addons that use tabs? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In a distant past, Storybook used to have a global tab bar at the top of the screen, allowing users to switch between Docs pages and stories. Storybook stopped using this internally by moving Docs pages to the sidebar, but the panel feature remains under the hood for addon authors.
This RFC proposes to remove the addon panel type altogether, to simplify UI maintenance and WCAG compliance.
Problem Statement
The fact that a tabbar exists in this part of the UI is problematic. To make Storybook more accessible, we want to implement a proper toolbar pattern for the top toolbar, and tablist patterns where we have tablists.
Having a UI element where both the toolbar tools and navigation tabs intersect makes it particularly hard to provide a coherent keyboard navigation pattern. We either have to present tools before tabs, even though the tools available in the toolbar depend on the current tab, or leave tools between the tablist and tabpanel, breaking the expected keyboard navigation pattern.
Removing the ability to create new tabs would solve this UI dilemma.
Addon authors would have to port their tabs to another UI mechanism. Decorators would allow addon authors to reimplement their own tab structures if they so desired.
Existing and planned layout customisations would allow addon authors to control what tools and UI elements appear in their tabs, which means they'd have good control over the final UI output of their addons.
A11Y Resources
Non-goals
No response
Implementation
In Storybook 10
In Storybook 11
Prior Art
No response
Deliverables
No response
Risks
If we don't provide alternatives for addon authors who have a legitimate need for full page views, this may blow back. A decorator could be provided that uses local parameters to switch between the actual story and a custom view.
Unresolved Questions
Alternatives considered / Abandoned Ideas
We've considered preserving the tabs feature with the current UI, but making it compatible with the DOM structure we need for accessibility will be hard. We'd end up having to use JS to absolutely position tabs where they exist and dynamically reserve space for them in the toolbar. That UI code would be prone to breaking.
We could also consider other UI forms (e.g. two bars) but the team so far prefers to remove tabs altogether.
Beta Was this translation helpful? Give feedback.
All reactions