Feature Policy: focus-without-user-activation#10672
Conversation
Cherry-picked from whatwg#4585
… policy is disabled.
|
There are more APIs that call the focusing steps. For example |
…d `popover focusing steps`
This is a good catch. I added extra steps in |
There seem to be more APIs than just the above ones that reference "focusing steps". Were you able to go through all of them and confirm that the ones you are updating herewith are the only ones that need updates? |
Could you mark the entries in the checklist that have been completed via |
There was a problem hiding this comment.
This looks reasonable, but it looks like you got in a race with the bot when updating OP. Each time you make an edit (including checking a checkbox) the bot will run. So it's best to click edit and change it all in one go and then wait for the bot to update before making another change.
Though also, if you filed bugs against Gecko/WebKit those need to be linked.
annevk
left a comment
There was a problem hiding this comment.
I found some more substantial issues. Please also create an MDN issue.
|
@annevk I addressed all your feedback. Please let me know if we can merge this PR. Thank you! |
annevk
left a comment
There was a problem hiding this comment.
This looks great, I appreciate your diligence!
One thing I noticed just now that doesn't impact the change directly is that this is a Permission Policy, not a Feature Policy. I'll fix that up in the commit message.
Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848
Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626}
Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626}
|
Thanks @siliu1 and @annevk for your contributions. Shall we consider original proposals #4326 and w3c/webappsec-permissions-policy#273 as done now or is there anything else to be done? |
Yeah, I think we can close the original issues #4326 and w3c/webappsec-permissions-policy#273. |
Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626}
Thanks @annevk! This should be taken care of now. Any thoughts on updating the PR template to remind people to mark their tests non-tentative? |
|
There is a reminder in a source comment: https://github.com/whatwg/html/blob/main/PULL_REQUEST_TEMPLATE.md?plain=1 |
…r-activation` policy WPT test, a=testonly Automatic update from web-platform-tests Remove .tentative for `focus-without-user-activation` policy WPT test Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626} -- wpt-commits: 97b7e08c91ae940982edf760395bd40a8ce28305 wpt-pr: 51204
…r-activation` policy WPT test, a=testonly Automatic update from web-platform-tests Remove .tentative for `focus-without-user-activation` policy WPT test Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626} -- wpt-commits: 97b7e08c91ae940982edf760395bd40a8ce28305 wpt-pr: 51204
…r-activation` policy WPT test, a=testonly Automatic update from web-platform-tests Remove .tentative for `focus-without-user-activation` policy WPT test Spec PR for `focus-without-user-activation` permissions policy has landed. whatwg/html#10672. We should remove .tentative for all related WPT tests. Bug: 371112534 Change-Id: I743185921665663a5a530bfb83b461d7a3e0d848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333401 Auto-Submit: Siye Liu <[email protected]> Commit-Queue: Sanket Joshi <[email protected]> Reviewed-by: Sanket Joshi <[email protected]> Cr-Commit-Position: refs/heads/main@{#1429626} -- wpt-commits: 97b7e08c91ae940982edf760395bd40a8ce28305 wpt-pr: 51204
focus-without-user-activationis a new feature policy that can be used to block programmatic focus changes that are not triggered through user activation (explainer).The motivation behind this feature policy is to provide better security for websites that embed third party contexts.
This change makes modifications to the following focus API:
autofocuselement.focus(options)window.focus()The WHATWG resolved to add a new feature policy,
focus-without-user-activation, to control whether third-party iframes can take focus programmatically. (w3c/webappsec-permissions-policy#273 (comment))The original PR contains all prior discussions regarding the feature policy. However, since I don't have editor access to it, I've created this new PR.
focus-without-user-activationfeature policy mozilla/standards-positions#1080focus-without-user-activationfeature policy WebKit/standards-positions#406focus-without-user-activationpermissions policy mdn/content#37532(See WHATWG Working Mode: Changes for more details.)
/acknowledgements.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )
/interactive-elements.html ( diff )
/popover.html ( diff )