fix(core): remove misleading TabList orientation prop#4293
Open
HelloOjasMutreja wants to merge 2 commits into
Open
fix(core): remove misleading TabList orientation prop#4293HelloOjasMutreja wants to merge 2 commits into
HelloOjasMutreja wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
HelloOjasMutreja
marked this pull request as ready for review
July 25, 2026 05:31
HelloOjasMutreja
requested review from
cixzhang,
ejhammond,
imdreamrunner and
josephfarina
as code owners
July 25, 2026 05:31
The orientation prop did not render vertical tabs. It only toggled the keyboard-hint badge arrows (horizontal vs vertical). Arrow-key navigation has always accepted both axes unconditionally via orientation: 'both' in useListFocus, and aria-orientation was deliberately never set on the nav (invalid on the navigation role, triggers axe aria-allowed-attr). Remove the prop to prevent consumers from assuming a vertical tab-strip layout exists. Keyboard behavior is unchanged. Adds a v0.1.9 codemod (astryx upgrade) that strips orientation from all TabList usages. Includes 8 codemod unit tests and a [breaking] changeset. Closes facebook#4231
HelloOjasMutreja
force-pushed
the
fix/tablist-remove-orientation-prop
branch
from
July 25, 2026 05:37
fe03028 to
2597408
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4231.
TabListexposed anorientation?: 'horizontal' | 'vertical'prop that implied vertical tab strips existed. They do not. The prop only controlled which arrow icons appeared in the ephemeral keyboard-hint badge (useKeyboardHint). It had zero effect on:useListFocushas always usedorientation: 'both', accepting all four arrow axes unconditionally per the WAI-ARIA tab APG.aria-orientation-- deliberately never set (invalid on thenavigationrole; triggers an axearia-allowed-attrviolation).Keeping the prop lets consumers believe they can render vertical tabs when they cannot. Removing it is the honest fix.
Changes
packages/coreTabList.tsx-- removeorientationfromTabListPropsand the function signature; calluseKeyboardHint()with no arguments (defaults to'horizontal'); update stale comment inuseListFocusblock.TabListContext.ts-- remove the now-unusedTabListOrientationtype.TabList.test.tsx-- update thearia-orientationregression test to remove theorientation="vertical"rerender (the invariant itself is still tested).TabList.doc.mjs-- remove orientation from the props table.packages/cli(codemod)transforms/v0.1.9/remove-tablist-orientation.mjs-- stripsorientationfrom all<TabList>usages. Import-source-aware (@astryxdesign/core,@astryxdesign/core/TabList,@xds/core,@xds/core/TabList), alias-aware.transforms/v0.1.9/index.mjs-- v0.1.9 transform manifest.transforms/v0.1.9/__tests__/remove-tablist-orientation.test.mjs-- 8 tests: both orientation values, expression values, aliases, subpath imports, no-op paths, non-regression for other components.codemods/registry.mjs-- registers'0.1.9'in the upgrade registry.Changeset
[breaking](0.x minor bump) for@astryxdesign/core. Consumers runastryx upgradeto auto-remove the prop.Behavior change
The only observable difference is the keyboard-hint badge: it now always shows left/right arrows (the
useKeyboardHintdefault) rather than up/down arrows whenorientation="vertical"was passed. This is correct -- both axes have always worked regardless.Testing
TabList.test.tsxtests pass.@astryxdesign/corebuild clean (Babel + tsc + CSS + UMD).