Prior to these recent changes, we would commonly apply a custom focus ring around elements to indicate an element was focused. There were several issues with this approach. For one, this focus ring was usually well below the 3:1 contrast ratio needed to meet WCAG (Level AA) standards. Also, the focus ring was always rendered as a ring outside of the focused element, meaning it would often be obscured when it exceeded the boundaries of its parent element. Additionally, we often set outline: none
on elements that have this custom focus ring so an outline would not clash with our custom style, and since OS-level forced color modes often rely on applying an outline to indicate focus, our explicit removal of any outline meant that these force color modes couldwould not indicate that an element was focused.
TopbarTop bar