Skip to content

docs(design-system-docs): document Divider for EDS 2.0#4875

Open
eddiman wants to merge 2 commits intomainfrom
docs/4701-divider-documentation
Open

docs(design-system-docs): document Divider for EDS 2.0#4875
eddiman wants to merge 2 commits intomainfrom
docs/4701-divider-documentation

Conversation

@eddiman
Copy link
Copy Markdown
Contributor

@eddiman eddiman commented Apr 30, 2026

Summary

  • Rewrite the Divider docs page for the new next/Divider component (replaces the empty stub)
  • Move the page from Data Display to Surfaces, matching the component's Storybook category
  • Register a Surfaces category in sidebars.ts

Test plan

  • pnpm --filter design-system-docs start and verify the Divider page renders under Surfaces in the sidebar
  • Confirm the Storybook iframe loads eds-2-0-beta-surface-divider--introduction
  • Sanity-check that the Data Display category no longer lists Divider

Closes #4701

Rewrites the Divider page for the new next/Divider component, moves it from
Data Display to Surfaces, and registers a Surfaces sidebar category.

Closes #4701
@pomfrida
Copy link
Copy Markdown
Collaborator

pomfrida commented May 5, 2026

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented May 5, 2026

Claude finished @pomfrida's task in 1m 45s —— View job


Code Review

  • Gather context
  • Read changed files
  • Review Divider component implementation for accuracy
  • Post review feedback

Overall this is a clean, well-structured docs page. The content is accurate against the component implementation. A few observations below.

Verified correct

  • Storybook iframe IDeds-2-0-beta-surface-divider--introduction matches the story title 'EDS 2.0 (beta)/Surface/Divider' with story name Introduction. ✓
  • Color token — The Figma section references --eds-color-border-subtle, which matches divider.css:4 (--_color: var(--eds-color-border-subtle)). ✓
  • <hr> semantics — The accessibility section correctly describes the implicit role="separator" from the native <hr> element. ✓
  • Sidebar placement — The new Surfaces category sits in a logical position in sidebars.ts and is consistent with how Feedback and Navigation categories are structured (no link/overview page). ✓

Issues

1. sidebar_position: 2 on the only item in the category

divider.md:3 has sidebar_position: 2, but Divider is currently the only item registered in the Surfaces sidebar category. The position doesn't cause a visible bug, but 1 would be semantically correct. Fix this →

2. Outdated WAI-ARIA spec link

divider.md:36 links to the WAI-ARIA 1.1 spec (2017):

https://www.w3.org/TR/2017/REC-wai-aria-1.1-20171214/#separator

The current version is 1.2. Consider updating to:

https://www.w3.org/TR/wai-aria-1.2/#separator

Fix this →


Suggestions

3. Missing import/usage example

Other EDS 2.0 docs (e.g. chip.md) include a code snippet showing how to import and use the component. The divider page goes straight from the Storybook embed to "When to Use" with no code example. Adding a small Usage section would keep this consistent:

## Usage

```tsx
import { Divider } from '@equinor/eds-core-react/next'

<Divider />

**4. Other Surfaces stub pages not registered (informational)**

`surfaces/accordion.md`, `card.md`, `side_sheet.md`, and `toolbar.md` already exist as stubs but are not added to the new Surfaces sidebar category. This appears intentional (they're empty stubs), but worth being aware of — the next time a Surface component is documented, the author should remember to add it to the `Surfaces` items array in `sidebars.ts`.

---
 |

Copy link
Copy Markdown
Collaborator

@pomfrida pomfrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits, will approve after 👍

- Use dividers occasionally, to create groupings rather than separate individual items
- Dividers should be noticeable in a layout, but not clashing
- Dividers should only be used if elements can't be split using white space
- Dividers can help establish rhythm and hierarchy
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 8 and 27 is kind of identical - is it needed here?


## Accessibility

Dividers follow the [WAI-ARIA separator pattern](https://www.w3.org/TR/2017/REC-wai-aria-1.1-20171214/#separator) and render as a non-interactive `<hr>` element with `role="separator"`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Dividers follow the [WAI-ARIA separator pattern](https://www.w3.org/TR/2017/REC-wai-aria-1.1-20171214/#separator) and render as a non-interactive `<hr>` element with `role="separator"`.
Dividers follow the [WAI-ARIA separator pattern](https://www.w3.org/TR/2017/REC-wai-aria-1.1-20171214/#separator) and renders as a native `<hr>`, which has the implicit ARIA role separator.`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Divider] Update documentation in Storybook and Docusaurus

2 participants