Support for Focus-Indicated Pseudo-class: `:focus-visible` https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo https://github.com/WICG/focus-visible
<rdar://problem/40444220>
I cannot believe after 5 years web cannot support this feature fully.
I'm working on this, hopefully I will upload a patch in the coming days/weeks.
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.
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.
*** Bug 30523 has been marked as a duplicate of this bug. ***
:focus-visible was enabled by default in https://trac.webkit.org/changeset/286783/webkit