Skip to content

Explain :focus-visible intent, add examples and UA guidance#2897

Merged
tabatkins merged 4 commits into
w3c:masterfrom
alice:focus-visible-guidance
Sep 4, 2018
Merged

Explain :focus-visible intent, add examples and UA guidance#2897
tabatkins merged 4 commits into
w3c:masterfrom
alice:focus-visible-guidance

Conversation

@alice

@alice alice commented Jul 9, 2018

Copy link
Copy Markdown

@tabatkins Following up on #2481, trying to more clearly explain the intent of this pseudo-class and provide better author and UA guidance.

Thanks to @patrickhlauke and @AmeliaBR for inspiration for the second example (not sure how to credit you in the spec).

cc @robdodson @bkardell

@alice alice force-pushed the focus-visible-guidance branch from c163ec2 to 6a01130 Compare July 9, 2018 07:27
@AmeliaBR

AmeliaBR commented Jul 9, 2018

Copy link
Copy Markdown
Contributor

I'm concerned about the phrase "element which does not support user input".

Technically, every focusable element supports user input. That input may only be activation, though. Maybe make it "text input" explicitly?

Comment thread selectors-4/Overview.bs Outdated
such that the focus is moved to a new element
which does <em>not</em> support user input,
the newly focused element
should <strong>not</strong> not match '':focus-visible''.</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not not" match?

@alice

alice commented Jul 9, 2018

Copy link
Copy Markdown
Author

@AmeliaBR Yeah, I hesitated over that text, but I wasn't sure about "text input" because it's also numeric, date/time etc so I hedged.

How about this?

Any element which supports keyboard input (such as an <input> element, or any other element
which may trigger a virtual keyboard to be shown on focus if a physical keyboard is not present)

@alice

alice commented Jul 10, 2018

Copy link
Copy Markdown
Author

(Added a bullet point regarding user preferences at the top of the heuristics list.)

@bkardell

Copy link
Copy Markdown
Contributor

Yeah, we discussed this many times... it is wonky to define in terms we have - even 'virtual keyboard' is potentially a little confusing if you think of it as the qwerty thing, really it's pretty much any means of inputting text of some kind into some kind of control. I think the text here is pretty good

@dbaron

dbaron commented Aug 20, 2018

Copy link
Copy Markdown
Member

@tabatkins @fantasai curious about the state of this PR. (See link to TAG issue above; we keep pushing it forward on the TAG agenda.)

@robdodson

Copy link
Copy Markdown
Contributor

friendly ping, @tabatkins or @fantasai do y'all have any thoughts?

@slightlyoff

Copy link
Copy Markdown

Per w3ctag/design-reviews#233, consider this a friendly ping @tabatkins

@tabatkins tabatkins merged commit 5cb52d9 into w3c:master Sep 4, 2018
@tabatkins

Copy link
Copy Markdown
Member

Just did some very minor cleanup of markup, and tweaked some 2119 term usage. Otherwise this looks great, thanks so much @alice!

@FremyCompany

FremyCompany commented Sep 10, 2018

Copy link
Copy Markdown
Contributor

Travis Leithead from Microsoft realized there were a couple of typos in the code example;
I fixed them in afbffa4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

selectors-4 Current Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants