Address breadcrumb `aria-current` issues
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
🧹 Tech Debt
FAST's breadcrumb has logic for updating aria-current on breadcrumb items, but there are multiple issues with it:
-
The logic assumes that the last breadcrumb item (the one for the current page) has
href=''set on it. The Nimble breadcrumb documentation and Storybook example do not state or follow that convention.- If
hrefis not set,aria-currentdoes not get set. - Note that the breadcrumb item template bakes in this assumption by not rendering a link when its
hrefis''. This is reasonable, given thathref=''indicates the current page, and the breadcrumb item for the current page should render as non-interactive text.
- If
-
The code queries into the
shadowRoots of childBreadcrumbItems. -
The code is only run when slotted items change. It does not respond to changes in those slotted breadcrumbs'
hrefvalues or changes in their children,. We need to consider the implications and ensure all valid use patterns result inaria-currentbeing set correctly. -
The logic implies that breadcrumb items support native
aelements as content (as an alternative to setting anhrefdirectly on the breadcrumb item). Nimble breadcrumb items do not support that.
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
Start with the breadcrumb.ts aria-current logic linked in the issue, then compare it with the Nimble breadcrumb documentation and Storybook example. Trace valid href, slotted-content, and child-change patterns; done means every supported current-page pattern sets aria-current without querying child shadow roots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100