From a564b7e104b05d7e582e45fcd8c08a6a7dfb4e95 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Fri, 8 Jan 2021 12:54:37 +0100 Subject: [PATCH] [selectors] Add new test for :focus-visible This test checks that when you focus an element via script, it show a focus ring with `outline-style: auto`. See: w3c/csswg-drafts#4278 & whatwg/html#6256 Currently Chromium passes this test, because despite they don't use `:focus-visible` in the UA stylesheet, it's painting an auto style outline when an element is focused. However Firefox fails it, because even when it uses `:-moz-focusring` (the equivalent to `:focus-visible`) in the UA stylesheet, it uses dotted style for the outline. WebKit doesn't support `:focus-visible` yet an it fails, thought it's painting an auto style outline (the background color doesn't match on the test). --- css/selectors/focus-visible-017.html | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 css/selectors/focus-visible-017.html diff --git a/css/selectors/focus-visible-017.html b/css/selectors/focus-visible-017.html new file mode 100644 index 000000000000000..3edf4c8a5ec9b02 --- /dev/null +++ b/css/selectors/focus-visible-017.html @@ -0,0 +1,36 @@ + + +CSS Test (Selectors): Programatic focus matches :focus-visible + + + + + + + + +
Target
+