Bug 185859 - [selectors] Support for Focus-Indicated Pseudo-class: `:focus-visible`
Summary: [selectors] Support for Focus-Indicated Pseudo-class: `:focus-visible`
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Manuel Rego Casasnovas (Holidays - back 1st Sep)
URL:
Keywords: InRadar
: 30523 (view as bug list)
Depends on: 225147 225148 221889 221895 222028 222647 223113 224598 224827 225075
Blocks: 221925 222645 220578
  Show dependency treegraph
 
Reported: 2018-05-22 01:11 PDT by James Craig
Modified: 2021-05-17 19:27 PDT (History)
21 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2018-05-22 01:11:01 PDT
Support for Focus-Indicated Pseudo-class: `:focus-visible`

https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
https://github.com/WICG/focus-visible
Comment 1 Radar WebKit Bug Importer 2018-05-22 01:11:21 PDT
<rdar://problem/40444220>
Comment 2 Amir mohammadi 2021-02-10 23:58:12 PST
I cannot believe after 5 years web cannot support this feature fully.
Comment 3 Manuel Rego Casasnovas (Holidays - back 1st Sep) 2021-02-11 00:39:17 PST
I'm working on this, hopefully I will upload a patch in the coming days/weeks.
Comment 4 Diego Pino 2021-04-20 00:47:47 PDT
These two tests are failing in WPE after r273812:

  imported/w3c/web-platform-tests/css/selectors/focus-visible-003.html
  imported/w3c/web-platform-tests/css/selectors/focus-visible-004.html

Test dashboard:

https://results.webkit.org/?platform=GTK&platform=WPE&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fselectors%2Ffocus-visible-003.html

https://build.webkit.org/results/WPE-Linux-64-bit-Release-Tests/r276286%20%281261%29/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-diff.txt

--- /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt
+++ /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-actual.txt
@@ -28,5 +28,5 @@
 PASS Focus element INPUT#el-9 via mouse should NOT match :focus-visible as it does NOT support keyboard input
 PASS Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input
 PASS Focus element INPUT#el-12 via mouse should NOT match :focus-visible as it does NOT support keyboard input
-PASS Focus element INPUT#el-13 via mouse should NOT match :focus-visible as it does NOT support keyboard input
+FAIL Focus element INPUT#el-13 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-13 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 255, 255)"

https://build.webkit.org/results/WPE-Linux-64-bit-Release-Tests/r276286%20%281261%29/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-diff.txt

--- /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt
+++ /home/buildbot/worker/wpe-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-actual.txt
@@ -24,5 +24,5 @@
 PASS Focus element INPUT#el-7 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none"
 PASS Focus element INPUT#el-8 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none"
 PASS Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none"
-PASS Focus element INPUT#el-11 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none"
+FAIL Focus element INPUT#el-11 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-11 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 255, 255)"

Updated expectations in r276291.
Comment 5 Manuel Rego Casasnovas (Holidays - back 1st Sep) 2021-04-20 02:44:09 PDT
Thanks Diego(In reply to Diego Pino from comment #4)
> These two tests are failing in WPE after r273812:
> 
>   imported/w3c/web-platform-tests/css/selectors/focus-visible-003.html
>   imported/w3c/web-platform-tests/css/selectors/focus-visible-004.html

Thanks Diego for the report, they fail because <input type="color"> is not supported on WPE. I'm adding the new expectations on bug #224808.
Comment 6 Sam Sneddon [:gsnedders] 2021-05-17 02:55:22 PDT
*** Bug 30523 has been marked as a duplicate of this bug. ***