Allow navigation items in side navigation to just display information rather than behaving as a link
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary
Allow normal link behaviour on a navigation item in the side navigation to be disabled so that it can just act as a way to display information (an icon and text), e.g. like the user's name when they are signed in to an app.
## 💬 Description
The navigation items on the side navigation component are currently only designed to act as links, i.e. they are interactive - you can click on them, focus on them and see hover / active states.
A request has been made by a customer to have the option to make a navigation item non-interactive, just displaying an icon and text, such as the user's name if they are signed into the app.
Having a navigation item which doesn't change the URL when clicked is easy enough by just not providing an href or slotting in a link. The issues that remain, however, are:
1. The navigation item is still in the tab order so still shows a focus indicator when focussed or clicked on.
2. It still shows hover and pressed states.
3. It still shows the "pointer" cursor, suggesting that it is clickable.
This ticket would be to provide a way (perhaps a new prop) to remove all this styling ^ so that it is simply displaying the information and doesn't appear to be interactive.
**Notes:**
- I would assume that navigation items like this should only be possible on the side navigation component and not the top navigation.
- It would be important to check that how these navigation items are read out to screen reader users still makes sense / is logical.
## 💰 User value
This would allow developers to have more control over how they use the side navigation component.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named in the issue. Start by locating the side navigation component and its navigation-item tests, then check how a non-interactive item is rendered and announced; done means its focus, hover, pressed, and pointer states no longer imply interaction while screen-reader behavior remains logical.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100