Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(a11y): give the collapsing scroll-panel fixture focusable content (#10077)

Christopher Chedeaua011cf9fc309
diff --git a/apps/storybook/stories/Resizable.stories.tsx b/apps/storybook/stories/Resizable.stories.tsx
index 2055b28de8..55d39bce23 100644
--- a/apps/storybook/stories/Resizable.stories.tsx
+++ b/apps/storybook/stories/Resizable.stories.tsx
@@ -804,6 +804,8 @@ export const CollapsedPanelFixture: Story = {
/**
* Browser fixture for a scrolling LayoutPanel that collapses to width 0. Its
* content overflows while it is open, and a button collapses and opens it.
+ * The lines are buttons, so a keyboard reaches the scrolling content without
+ * a tab stop on the panel.
*/
function CollapsingScrollPanel() {
const [isOpen, setIsOpen] = useState(true);
@@ -825,7 +827,7 @@ function CollapsingScrollPanel() {
hasDivider
data-testid="collapsing-end">
{Array.from({length: 40}, (_, index) => (
- <Text key={index}>Detail line {index + 1}</Text>
+ <Button key={index} label={`Detail line ${index + 1}`} />
))}
</LayoutPanel>
}