Created by: arizzitano
The dropdown styles explicitly remove the browser's default focus outline for links within the menu, which hurts accessibility as it violates WCAG 2.0 AA section 2.4.7 [edit: technically, the focus highlight background color prevents it from failing]. Without the focus outline, keyboard-only users cannot orient themselves within a dropdown menu, which can be especially troublesome if the implementor has also applied a focus trap.
This PR removes the override, enabling the browser to apply its own native focus outline to links within the dropdown menu. The outline will only appear if a link has :focus
, so mouse users will see virtually no change.
Suggestions welcome -- happy to amend as necessary!
Screenshots
Before | After |
---|---|