Commit 5e70c1d
committed
menu: reintroduce desktop hover previews
Add visual previews for closed submenus on wide layouts with
hover-capable pointers. This reintroduces desktop hover behavior without
making hover the only way to reach submenu links.
The CSS-only preview creates a semantic incongruence: while a closed
category is hovered, its submenu is visible even though the native
details state remains closed. Screen readers therefore continue to
announce the category as collapsed during the preview.
This tradeoff is acceptable because it applies only during committed,
direct use of a mouse or another hover-capable pointer. The user must
keep the pointer over the category to invoke the preview. Moving the
pointer away removes it. Clicking a previewed category opens the native
details element, aligns the visual and semantic states, and keeps the
submenu visible after the pointer leaves.
Keyboard and touch interactions do not trigger the preview. They
continue to use the native disclosure behavior. No destination depends
on hover. Suppress previews whenever any submenu is explicitly open so
clicked and previewed menus cannot compete or overlap.1 parent 2b84229 commit 5e70c1d
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
650 | 667 | | |
651 | 668 | | |
652 | 669 | | |
| |||
0 commit comments