JSPM

focus-outline-manager

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39720
  • Score
    100M100P100Q154817F
  • License BSD-3-Clause

Watch users keyboard input and manage the focus outline visibility

Package Exports

  • focus-outline-manager

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (focus-outline-manager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

focus-outline-manager

Watch users keyboard input and manage the focus outline visibility

NPM version

By default, browsers add an outline around buttons and other controls when they are clicked:

Removing the outline for all users by setting *:focus {outline: none;} will make the site less accessible for keyboard users.

focus-outline-manager enables you to remove the outline for mouse users, retaining it for keyboard users.

Demo

Install

npm install --save focus-outline-manager

Usage

Using CommonJS module loading:

require('focus-outline-manager');

CSS:

html.focus-outline-hidden *:focus {
    outline: none;
}

Credits

  • focus-outline-manager is based on a Chromium UI utility focus-outline-manager.js (Copyright © 2012, The Chromium Authors).

Other Implementations