Bug 224026
| Summary: | Web Inspector: adapt :focus-visible internally | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
| Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> |
| Status: | ASSIGNED | ||
| Severity: | Normal | CC: | firefoxic.dev, inspector-bugzilla-changes, rego, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
Nikita Vasilyev
:focus-visible is implemented behind an experimental flag (":focus-visible pseudo class").
Once it's on by default, we should add:
:focus:not(:focus-visible) {
outline: none;
}
This will allow to closer match macOS focus behavior. For example, currently, clicking on "Hover" checkbox (to force `:hover` state) displays the focus outline around it.
With the CSS rule above, it would only draw the outline when it's focused by using keyboard navigation, which matches native apps behavior.
https://twitter.com/leaverou/status/1045768279753666562?lang=en
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/76078422>
Manuel Rego Casasnovas
Ideally the default UA should change to use :focus-visible directly, so that kind of rule won't be needed.
See bug #221925.
Nikita Vasilyev
(In reply to Manuel Rego Casasnovas from comment #2)
> Ideally the default UA should change to use :focus-visible directly, so that
> kind of rule won't be needed.
>
> See bug #221925.
Thanks for the heads up. That's great!
This bug then is about removing obscure focus management logic that predates :focus-visible. One example:
https://github.com/WebKit/WebKit/blob/37d73f68d97e0a6c88cb19572874d140233ffbeb/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js#L290-L294