Commit dabbef1
[origin] Fix sidebar navigation roles (#28838)
## Summary
- Fixes DES-67 by removing default ARIA menu semantics from Origin
Sidebar navigation containers.
- Keeps explicit `role` forwarding on `Sidebar.Menu` as an escape hatch
for consumers that implement complete menu/menuitem semantics and
keyboard behavior.
- Clarifies in stories/tests that Sidebar navigation is a
layout/navigation grouping primitive; command menus should use Origin
Menu, and tree semantics should use `Sidebar.Tree`.
## Accessibility decision
`Sidebar.Menu` and expandable submenu containers no longer default to
`role=\"menu\"` because sidebar navigation items do not implement full
ARIA menu keyboard behavior. Consumers can still pass `role=\"menu\"`
explicitly when they own the corresponding `menuitem` semantics and
interaction model.
## Storybook preview
Origin Storybook:
https://dev.dev.sparkinfra.net/app/origin-storybook-pr-28838/
- `Components/Sidebar/Default`:
https://dev.dev.sparkinfra.net/app/origin-storybook-pr-28838/?path=/story/components-sidebar--default
- `Components/Sidebar/WithTreeItems`:
https://dev.dev.sparkinfra.net/app/origin-storybook-pr-28838/?path=/story/components-sidebar--with-tree-items
- `Components/Sidebar/AllItemVariants`:
https://dev.dev.sparkinfra.net/app/origin-storybook-pr-28838/?path=/story/components-sidebar--all-item-variants
## Verification
- `mise exec -- corepack yarn workspace @lightsparkdev/origin test:unit
src/components/Sidebar/Sidebar.unit.test.tsx`
- `mise exec -- corepack yarn workspace @lightsparkdev/origin exec
prettier --check src/components/Sidebar/parts.tsx
src/components/Sidebar/Sidebar.unit.test.tsx
src/components/Sidebar/Sidebar.stories.tsx`
- `mise exec -- corepack yarn workspace @lightsparkdev/origin exec
eslint src/components/Sidebar/parts.tsx
src/components/Sidebar/Sidebar.unit.test.tsx
src/components/Sidebar/Sidebar.stories.tsx`
- `mise exec -- corepack yarn workspace @lightsparkdev/origin types`
Jira: https://lightspark.atlassian.net/browse/DES-67
Co-authored-by: Cursor <cursoragent@cursor.com>
GitOrigin-RevId: 76341209322fdce512d9c5204eeba89f2985e3631 parent d297d00 commit dabbef1
3 files changed
Lines changed: 44 additions & 11 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
667 | 669 | | |
668 | 670 | | |
669 | 671 | | |
670 | | - | |
| 672 | + | |
| 673 | + | |
671 | 674 | | |
672 | 675 | | |
673 | 676 | | |
674 | 677 | | |
675 | 678 | | |
676 | 679 | | |
677 | | - | |
| 680 | + | |
678 | 681 | | |
679 | 682 | | |
680 | 683 | | |
| |||
845 | 848 | | |
846 | 849 | | |
847 | 850 | | |
848 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
849 | 854 | | |
850 | 855 | | |
851 | 856 | | |
| |||
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
499 | 532 | | |
500 | 533 | | |
501 | 534 | | |
| |||
582 | 615 | | |
583 | 616 | | |
584 | 617 | | |
585 | | - | |
| 618 | + | |
| 619 | + | |
586 | 620 | | |
587 | 621 | | |
588 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 335 | + | |
341 | 336 | | |
342 | 337 | | |
343 | 338 | | |
| |||
519 | 514 | | |
520 | 515 | | |
521 | 516 | | |
522 | | - | |
523 | 517 | | |
524 | 518 | | |
525 | 519 | | |
| |||
0 commit comments