Skip to content

Commit

Permalink
docs: update Navlist documentation (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
massao committed Sep 1, 2023
1 parent 0a39436 commit d6b259b
Showing 1 changed file with 6 additions and 5 deletions.
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.

1 comment on commit d6b259b

@vercel
Copy link

@vercel vercel bot commented on d6b259b Sep 1, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.