| 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 | ||
Ideally the default UA should change to use :focus-visible directly, so that kind of rule won't be needed. See bug #221925. (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 |
: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