Nav Hover Pseudo-element Test
Tests the Firefox bug where &::after:hover doesn't fire but &:hover::after does. This affects USWDS nav accordion expand/collapse icons.
Firefox issue: The USWDS nav SCSS uses &::after:hover { background-color: ... } to change the accordion icon color on hover. Per CSS spec, :hover on ::after pseudo-elements is unreliable in Firefox. The fix is &:hover::after { ... }.
Test: Accordion Expand Icons
Hover over these buttons. The expand icon (::after pseudo-element) should change color on hover in both Chrome and Firefox.
Side-by-side comparison
Two buttons with different CSS approaches. In Firefox, only the right one should change the icon color on hover.
Buggy: &::after:hover
Fixed: &:hover::after
Expected behavior
| Selector | Chrome | Firefox |
|---|---|---|
&::after:hover |
Icon changes color | Icon does NOT change color |
&:hover::after |
Icon changes color | Icon changes color |