Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update Navlist documentation #2570

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/components/navlist/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ storybook: 'https://f36-storybook.contentful.com/?path=/story/components-navlist
typescript: ./src/NavList/NavList.tsx,./src/NavListItem/NavListItem.tsx
---

NavList can be used to render a sidebar navigation list
`NavList` is used to render a sidebar navigation list

## Import

Expand All @@ -18,7 +18,7 @@ import { NavList } from '@contentful/f36-navlist';

## Examples

NavList can be used to render vertical navigation list, it can be used for links and for buttons:
NavList is used to render vertical navigation list, it may contains links or buttons:

- `NavList` can be rendered as `nav` or `div`
- `NavList.Item` can be rendered as `button` or `a`
Expand Down Expand Up @@ -67,9 +67,10 @@ Example with items with active or disabled state

## Content guidelines

Link names should be shor and descriptive
- `NavList.Item` texts should be short and descriptive

## Accessibility

- If rendered with `div` the role of navigation is set.
- `NavList` can be passed an `aria-label` to override the default `Sidebar`
- When rendered with `div` the `aria-role` must be set to `navigation`.
- `NavList` can be passed an `aria-label` to override the default `Sidebar`.
- `NavList.Item` should always navigate the user, and not trigger other actions.
Loading