A simple polyfill for the `:focus-ring` spec


0.1.53 years ago3 years agoMinified + gzip package size for @adobe/focus-ring-polyfill in KB


Focus Ring Polyfill

A polyfill for the :focus-ring spec.


It is similar to the WICG polyfill, but adds support for dealing with focus programmatically set after an Arrow key or Esc, which is needed for controls like tab lists or dialogs.

Should be used with the postcss-focus-ring plugin to convert this:

button:focus-ring {
  /* focus-ring only stuff */

to this:

button.focus-ring {
  /* focus-ring only stuff */

This polyfill can then add and remove this .focus-ring to mimic the :focus-ring spec.


Sign the CLA, follow the contributing guidelines, and ask any questions that might arise.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.