v2.0.0
版本发布时间: 2017-08-17 07:47:22
WICG/focus-visible最新发布版本:v5.2.1(2024-08-13 01:18:02)
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