Bug 241408 - [selectors] Button click that triggers focus shouldn't cause :focus-visible, when the button contains an element
Summary: [selectors] Button click that triggers focus shouldn't cause :focus-visible, ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-08 03:24 PDT by Dan Wolff
Modified: 2022-06-15 03:25 PDT (History)
2 users (show)

See Also:


Attachments
Test cases for experimenting (654 bytes, text/html)
2022-06-08 03:24 PDT, Dan Wolff
no flags Details
Minimal test case (109 bytes, text/html)
2022-06-08 03:25 PDT, Dan Wolff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Wolff 2022-06-08 03:24:31 PDT
Created attachment 460088 [details]
Test cases for experimenting

Tested in Safari on iOS 15.5.

For the "Minimal test case":

Clicking the "Click me" button should not cause a focus ring on the "Target button".

---

Scenario: Clicking a button causes another button to gain focus. The first button contains an element.

Problem: The button that gains focus, also gains focus-visible.

What happens when clicking the buttons in the "Test cases for experimenting" attachment:

- [bad] The target button GAINS focus-visible when clicking: "1. Span" and "2a. Inside span".
- [good] The target button DOES NOT gain focus-visible when clicking: "2b. Outside span", "3. pointer-events:none span" and "4. Without span".
Comment 1 Dan Wolff 2022-06-08 03:25:19 PDT
Created attachment 460089 [details]
Minimal test case
Comment 2 Radar WebKit Bug Importer 2022-06-15 03:25:13 PDT
<rdar://problem/95188454>