Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "user attention" definition to top-level traversable. #8466

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

jan-ivar
Copy link
Contributor

@jan-ivar jan-ivar commented Nov 2, 2022

Fixes #6211 potentially. @annevk is this close to what you had in mind?

Is this editorial? I dunno. It adds no new API, only a concept sought by other specs listed in the OP of #6211. Tests and implementation bugs seem up to individual specs when/if they decide to rely on this new concept, if doing so ends up influencing said specs to change any observable behavior.

  • At least two implementers are interested (and none opposed):

/interaction.html ( diff )

@whatwg whatwg deleted a comment from Octaviakimble Nov 5, 2022
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Apologies for the long delay here. This looks pretty good to me.

Are you also planning on making various specifications adopt this once this lands? Or should we try to do that in a more coordinated fashion?

source Show resolved Hide resolved
source Show resolved Hide resolved
@annevk annevk added topic: focus integration Better coordination across standards needed labels Feb 24, 2023
@jan-ivar
Copy link
Contributor Author

Are you also planning on making various specifications adopt this once this lands?

I've opened w3c/mediacapture-main#934 to take care of that spec, which is my main motivation.

I haven't contributed to the other two specs mentioned in the issue OP, so volunteers would be great! If none, I can try to shoe something in, just don't want to step on any toes.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

I like where this ended up. Two minor comments remain.

@domenic I think you should have a look as well.

source Show resolved Hide resolved
source Show resolved Hide resolved
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Looks good with nits

source Show resolved Hide resolved
source Show resolved Hide resolved
"<code data-x="">visible</code>", and it either has <span>system focus</span> or user agent
widgets directly related to it can receive keyboard input channeled from the operating system.</p>

<p class="note">User attention is lost when a browser window loses focus, whereas system focus might

Choose a reason for hiding this comment

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

What does it mean by browser window losing focus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means the browser window lost keyboard focus, which seems consistent with existing language in notes:

image

The note in this PR attempts to clarify the difference between user attention and system focus which both operate on that (the ability to "receive keyboard input channeled from the operating system").

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Pushed some wrapping nits. Let's merge this.

@annevk annevk merged commit 2db564c into whatwg:main Apr 28, 2023
@annevk
Copy link
Member

annevk commented Apr 28, 2023

Thanks a lot @jan-ivar for making this happen!

@jan-ivar jan-ivar deleted the attention branch September 19, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Better coordination across standards needed topic: focus
Development

Successfully merging this pull request may close these issues.

Need a "browser window has focus" algorithm that's true even while user types in URL bar
4 participants