Skip to content

Commit

Permalink
Add note on NavList.LeadingVisual (#857)
Browse files Browse the repository at this point in the history
* Add note on `NavList.LeadingVisual`

* Update content/components/nav-list.mdx

---------

Co-authored-by: Patrick H. Lauke <[email protected]>
  • Loading branch information
TylerJDev and patrickhlauke authored Sep 16, 2024
1 parent b0c3adc commit b2f6ee8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions content/components/nav-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,16 @@ For information on responsive layout of a nav list that is used in a sidebar, se

## Accessibility

Nav lists should always be labeled for assistive technologies, even if the label is visually hidden.
Nav lists should always be labeled for assistive technologies, even if the label is visually hidden. Nav list items are links, so they should never contain buttons or other clickable elements.

Nav list items are links, so they should never contain buttons or other clickable elements.
### Inactive Items

Inactive nav list items are not rendered as `<a>` tags since we don't know the href value. The only focusabe part of the item is the leading visual. See the [action list accessibility guidelines](/components/action-list#tooltips-and-dialogs-on-inactive-items) for more details.

### Leading Visuals

Leading visuals are intended to be decorative only; the context of the leading visual should be provided in the text of `NavList.Item`. Only the text in `NavList.item` and any trailing visuals within `NavList.Item` are included in its accessible name, while anything inside `NavList.LeadingVisual` will be ignored.

### Known accessibility issues (GitHub staff only)

<AccessibilityLink label="NavList"/>
Expand Down

0 comments on commit b2f6ee8

Please sign in to comment.