Skip to content

v2.0.0

Compare
Choose a tag to compare
@robdodson robdodson released this 16 Aug 23:47
· 149 commits to main since this release

This release comes with a couple of important changes.

#34 Changes the heuristic so it only matches if the user navigates using Tab or Shift + Tab. We decided to make this change after receiving feedback from partners who said the current heuristic of matching any keypress was too aggressive. In particular, if a user uses a keyboard shortcut in an app, suddenly focus rings start appearing.

#50, #51 A .js-focus-ring class is now added to the body to signal that the polyfill has loaded. This avoids situations where a developer might disable focus styles only to have the polyfill fail to load. The recommended CSS pattern is now:

.js-focus-ring :focus:not(.focus-ring) {
    outline: 0;
}

Full changelog