feat(ui): build Scrollspy, fix aria-current across the navigation group
Scrollspy replaces a scaffold that rendered bare anchors. The runtime observes the sections the links point at and writes the marker straight onto the links: an IntersectionObserver callback fires long after the client function that registered it returned, so a state write there would be dropped. Navbar and Breadcrumb both emitted aria-current="" for every inactive link. That is not a valid value -- the attribute takes a token or must be absent -- so every link claimed a state it did not have. Breadcrumb had it too, despite being the strongest component in the group. Navbar also takes roving arrow-key focus across its menu bar. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"generatedFrom": "packages/ui/component-reference.json",
|
||||
"componentCount": 108,
|
||||
"categoryCount": 11,
|
||||
"totalDemoCount": 420,
|
||||
"totalDemoCount": 419,
|
||||
"components": [
|
||||
{
|
||||
"name": "Accordion",
|
||||
@@ -990,11 +990,11 @@
|
||||
"slug": "scrollspy",
|
||||
"category": "navigation",
|
||||
"purpose": "Theme-aware, responsive scrollspy component.",
|
||||
"demoCount": 3,
|
||||
"demoCount": 2,
|
||||
"propCount": 7,
|
||||
"slots": ["default"],
|
||||
"events": ["change"],
|
||||
"profiled": false
|
||||
"profiled": true
|
||||
},
|
||||
{
|
||||
"name": "SearchBox",
|
||||
|
||||
Reference in New Issue
Block a user