Skip to content

Commit

Permalink
Update example heuristic in explainer. (#173)
Browse files Browse the repository at this point in the history
Related to #167. @alice PTAL
  • Loading branch information
robdodson committed Aug 8, 2018
1 parent 08f3bad commit 94c1472
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,14 @@ having both would provide more flexibility for authors.
## Example heuristic

The heuristic used to decide the current modality should not be defined
normatively. An example heuristic is to update modality on each style recalc:
if the most recent user interaction was via the keyboard;
and the key pressed was either `Tab`, `Shift + Tab`, or an arrow key;
then the modality is keyboard. Otherwise,
the modality is not keyboard.
normatively. An example heuristic is to update modality on each style recalc: if
the most recent user interaction was via the keyboard; and the key press did not
include a meta, alt/option, or control key; then the modality is keyboard.
Otherwise, the modality is not keyboard.

See [the web platform
tests](https://github.com/web-platform-tests/wpt/search?utf8=%E2%9C%93&q=focus-visible&type=)
which check against the proposed behavior.

## Implementation Prototype

Expand Down

0 comments on commit 94c1472

Please sign in to comment.