An open source design system that's fully customizable and agent ready
TypeScript
fix(a11y): give the scroll-region name stories focusable content (#10019)
Christopher Chedeaub1e8e09c91d1
diff --git a/apps/storybook/stories/ScrollRegionA11y.stories.tsx b/apps/storybook/stories/ScrollRegionA11y.stories.tsxindex 79a56f0550..ad8b27fe7b 100644--- a/apps/storybook/stories/ScrollRegionA11y.stories.tsx+++ b/apps/storybook/stories/ScrollRegionA11y.stories.tsx@@ -21,8 +21,16 @@ const styles = stylex.create({const LINES = Array.from({length: 40}, (_, index) => `Line ${index + 1}`);+/**+ * The lines are buttons, realistic focusable content: a keyboard reaches the+ * scrolling content without a tab stop on the region.+ */function Lines() {- return LINES.map(line => <p key={line}>{line}</p>);+ return LINES.map(line => (+ <p key={line}>+ <button type="button">{line}</button>+ </p>+ ));}function Frame({children}: {children: ReactNode}) {@@ -119,7 +127,9 @@ export const StackItemListScrolls: StoryObj = {<VStack height={240}><StackItem as="ul" data-scroll-region isScrollable size="fill">{LINES.map(line => (- <li key={line}>{line}</li>+ <li key={line}>+ <button type="button">{line}</button>+ </li>))}</StackItem></VStack>diff --git a/docs/specs/components/Layout/LayoutContent.spec.md b/docs/specs/components/Layout/LayoutContent.spec.mdindex eabedf103f..3798b71e72 100644--- a/docs/specs/components/Layout/LayoutContent.spec.md+++ b/docs/specs/components/Layout/LayoutContent.spec.md@@ -170,7 +170,10 @@ Consumer migration instructions belong in consumer docs and release notes.screen reader that reaches it, including as a browser-made Tab stop,announces it; Tab behavior is the browser's (owner decision, 2026-11-04).A caller's `role` takes only the caller's `label` (AR1), so a single main- landmark relies on its role (`spec:AST-025` FR12).+ landmark relies on its role (`spec:AST-025` FR12). Where the browser makes no Tab stop of it, a+ scrolling region whose content holds nothing focusable can't be scrolled+ from the keyboard. The caller then adds a focusable child or uses+ ScrollableArea.## Design relationshipsdiff --git a/docs/specs/components/Layout/LayoutPanel.spec.md b/docs/specs/components/Layout/LayoutPanel.spec.mdindex 46994b60a3..caef2f17c3 100644--- a/docs/specs/components/Layout/LayoutPanel.spec.md+++ b/docs/specs/components/Layout/LayoutPanel.spec.md@@ -176,7 +176,10 @@ Consumer migration instructions belong in consumer docs and release notes.an accessible name (the caller's `label`, or a translated "Content"), so ascreen reader that reaches it, including as a browser-made Tab stop,announces it; Tab behavior is the browser's (owner decision, 2026-11-04).- A caller's `role` takes only the caller's `label` (AR1).+ A caller's `role` takes only the caller's `label` (AR1). Where the browser makes no Tab stop of it, a+ scrolling region whose content holds nothing focusable can't be scrolled+ from the keyboard. The caller then adds a focusable child or uses+ ScrollableArea.## Design relationshipsdiff --git a/docs/specs/components/Stack/Stack.spec.md b/docs/specs/components/Stack/Stack.spec.mdindex 41a2b1c226..de29630eed 100644--- a/docs/specs/components/Stack/Stack.spec.md+++ b/docs/specs/components/Stack/Stack.spec.md@@ -157,7 +157,10 @@ Consumer migration instructions belong in consumer docs and release notes.a translated "Content"), so a screen reader that reaches it, including asa browser-made Tab stop, announces it; Tab behavior is the browser's (ownerdecision, 2026-11-04). A caller's `role` takes only the caller's- `aria-label`, and another element keeps its own role and name.+ `aria-label`, and another element keeps its own role and name. Where the browser makes no Tab stop of it, a+ scrolling region whose content holds nothing focusable can't be scrolled+ from the keyboard. The caller then adds a focusable child or uses+ ScrollableArea.## Design relationships