Skip to content

Commit

Permalink
Revert and rephrase landmarks guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Sep 4, 2024
1 parent bbfe796 commit bbb73e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions storybook/src/components/Accordion/Accordion.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ If you want the contents of an accordion section to appear initially, pass the `

<Canvas of={AccordionStories.ExpandedByDefault} />

### Improve semantics
### Limit the amount of accessibility landmarks

By default, an Accordion Section renders a `section` element in HTML.
Having many Accordion Sections on your page can lead to too many landmark regions, confusing screen reader users.
In that case, use `sectionAs="div"`.
An Accordion Section renders a `section` element in HTML by default.
Each of them introduces a landmark region, but having many of them on a page can confuse screen reader users.
Consider using general `div` elements instead through `sectionAs="div"`.

<Canvas of={AccordionStories.ImproveSemantics} />
<Canvas of={AccordionStories.ReduceLandmarks} />

### Technical considerations

Expand Down
2 changes: 1 addition & 1 deletion storybook/src/components/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ExpandedByDefault: Story = {
},
}

export const ImproveSemantics: Story = {
export const ReduceLandmarks: Story = {
args: {
sectionAs: 'div',
children: [
Expand Down

0 comments on commit bbb73e9

Please sign in to comment.