Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Fix/clarification for tabindex section #637

Closed
wants to merge 1 commit into from
Closed

Fix/clarification for tabindex section #637

wants to merge 1 commit into from

Conversation

patrickhlauke
Copy link
Member

@patrickhlauke patrickhlauke commented Oct 23, 2016

  • corrects what is presumably an accidental omission/typo (non-interactive elements forced into being focusable do not fire click as result of, say, ENTER key)

[edit] removed second commit, split out to separate PR

Assuming this is an oversight/typo?
@patrickhlauke
Copy link
Member Author

/cc @stevefaulkner

@chaals
Copy link
Collaborator

chaals commented Oct 23, 2016

LGTM - and tested in FF/Yandex to be stupidly sure

patrickhlauke added a commit to patrickhlauke/html that referenced this pull request Oct 24, 2016
It appears this is an oversight/typo, but: non-interactive elements that
are forced to be focusable with `tabindex` do NOT fire `click` when user
presses ENTER. xref w3c/html#637
@patrickhlauke
Copy link
Member Author

Note that apparently the omission of "not" is not a typo/oversight, but intentional (though the behavior is not actually implemented in user agents it seems) whatwg/html#1952 (comment) - worth holding off on merging this until some clarification?

@chaals
Copy link
Collaborator

chaals commented Oct 24, 2016

I suggest that since removing "not" reflects reality, we do this, open an issue for the desirable behaviour and note that in the spec...

@chaals chaals added the a11y label Oct 24, 2016
@patrickhlauke
Copy link
Member Author

@chaals one issue i see here as well is that, at least according to the thread in whatwg, the preceding sentence supposedly already says that it will fire click

An element that has its tabindex focus flag set but does not otherwise have an activation behavior defined has an activation behavior that does nothing.

Now I admit that my own reading of this seemed to suggest that, basically, that sentence does mean that click isn't fired...maybe i'm just not reading it right?

@patrickhlauke
Copy link
Member Author

patrickhlauke commented Oct 24, 2016

i.e. does "an activation behavior that does nothing" mean that nothing happens if i press enter, or does it mean that click IS fired but no other default action happens in the browser? (i guess i should explicitly ask again over in the whatwg thread for this)

@travisleithead
Copy link
Member

I think we may instead want to put an at-risk flag around the Activation section which indicates the spec-fiction that when activated, and element will dispatch a click event. Then we can track it later for CR-entry and pull it/change it, if implementations haven't caught up..

@patrickhlauke
Copy link
Member Author

@travisleithead as this is going a bit beyond my intended "here's a quick change that surely was a typo" level of complexity, mind if this gets assigned to somebody with a tad more spec experience? (I have no idea about at-risk flags etc)

@patrickhlauke
Copy link
Member Author

I'll split out the non-controversial commit as a separate PR

@chaals
Copy link
Collaborator

chaals commented Oct 27, 2016

@patrickhlauke as noted the text suggests that the click will be fired, but will result in nothing happening. Which isn't how reality works, so we should change the text until it says what happens - ;(

@chaals
Copy link
Collaborator

chaals commented Oct 27, 2016

@travisleithead I'm not sure there is a lot of controversy here. Changing browsers to start firing an extra event on fairly common things seems really risky, so much as I wish (and wished for the last couple of decades) they had already done what the spec asked, I doubt I would wish for that now.

So I am more inclined to just axe the spec-fiction and start thinking about smart ways to solve the problem that will work.

@travisleithead
Copy link
Member

This PR has diverged from its original intent. The forked PR was accepted. I filed #653 to track another fix. Closing this to keep the noise down.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants