From 94c1472cf6484fd9d78018029c35e985c9751a72 Mon Sep 17 00:00:00 2001 From: Rob Dodson Date: Tue, 7 Aug 2018 17:17:50 -0700 Subject: [PATCH] Update example heuristic in explainer. (#173) Related to #167. @alice PTAL --- explainer.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/explainer.md b/explainer.md index a59f42a..f6dbb34 100644 --- a/explainer.md +++ b/explainer.md @@ -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