-
Notifications
You must be signed in to change notification settings - Fork 58
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
Spatial Navigation #287
Comments
Hey all, Thanks for filing a review. We noted excitement about this at TPAC and are glad to have the opportunity to work with you on this. Thanks also for the detailed explainer. We spoke with folks working on this recently in an ad-hoc discussion, wanted to get some of these thoughts written down. Hostile iframes seem like a serious issue, but we're curious about how they're different to other sorts of focus capturing issues; e.g. the fullscreen API. Those APIs preserve a keyboard shortcut to allow escape. Is something like thpossible? The proposed feature policy seems like a promising direction. The traversal (distance computation) algorithm seems to have properties which result in unexpected (at least from a user's perspective). A potential improvement has been noted in your issue tracker - WICG/spatial-navigation#122 (comment) although there are probably better ways to approach this. Are Focusable Areas seem to have a correspondence with Intersection Observers. Has a similar set of rootMargin and threshold options been considered? An interesting point of feedback from other communities was around the right-left (start on one element, traversal, where focus does not return to the element the user came from, this seems like a limitation that should either be addressed or explicitly noted. Minor nit: The spec text for defining P1 and P2 could be clearer. |
Thanks for the detailed feedback! I think some of the issues can be solved as below: Hostile iframeYes, I think the Feature policy can solve this issue.
Distance computation algorithm
Focusable AreasI'm not sure I understand this point clear. If it is (A), using the (B) doesn't seem to match with the intention of the focusableAreas(). Returnable focus traversal(e.g. pressing the right-left-right arrow keys makes the focus return to the initial element) |
This had been solved with using feature policy and the spec had been updated: |
I've made progress on improving the distance computation algorithm. 1. Define more reasonable distance function2. Define P1 from the starting point and P2 from the candidate element for the distance functionPlease see the overall proposal for changing the distance computation algorithm in here. |
@cynthia and I are looking at this in a breakout at the TAG's Reykjavík face-to-face meeting. One concern that I have is the bit at the very end of the explainer about spatial navigation and HTMLFormElement, which links to a separate document. I have a few concerns here:
(Note that these comments are based on the explainer; I haven't looked at the spec.) @cynthia will add some comments on other topics that we looked at. |
Apologies for the delayed feedback! @dbaron and I looked at the incorporated changes and discussed this during the Iceland F2F. Some points of feedback: Completely turning off the feature with feature policy as a mitigation towards hostile iframes seems a bit extreme. Since the actual surface of attack from hostile iframes is rather narrow, prevention against trapping seems like a more sensible way forward. This is because you would still want to let the users focus into third party iframes, but would want to mitigate against focus trap attacks. Specifically, ad providers would probably not be happy if they are not clickable. Following that thought, the feature policy name should probably change when this is applied to reflect better exactly what is being allowed/disallowed. Small question: |
Thank you for the feedback! @dbaron
I have a vague thought which is making the navigation event do not cross shadow DOM boundaries. There is another approach to solve this issue, and the discussion about it is still going on.
There is That means, if the hostile iframe prevents default of To avoid this kind of attempt, Also, there is an on-going discussion about the new feature policy
Oh, the expression is ambiguous. It means that the distance considering only one axis. |
Thank you for the clarification. We discussed this during today's teleconference and as for the state of the spec as of today, we believe we have provided all the technical feedback we felt was necessary. As for the shadow DOM bits and feature policy overlap with another proposal, we'd like to see how the details get fleshed out - and if if feels like there have been substantial enough design changes we'd be happy to look into this again at that point. (Shadow DOM definitely feels like a large enough patch to warrant a second round of reviews.) We are happy to see this move forward, and thank you for bringing this up with us. |
Thank you for the review and give us feedback about Spatial Navigation! Recently, another design proposal about the spec is under consideration. Thank you again for giving valuable feedback about this! |
It doesn’t necessarily have to be a spec format, especially if multiple proposals are on the table. Something like a simple explainer with example code/demo works. We also have a dispute resolution issue template in the event you prefer that. Otherwise feel free to reppen when you have something you’d like us to look at. |
Hello TAG!
I'm requesting a TAG review of:
Further details (optional):
Relevant time constraints or deadlines: No strict deadline, but speedy feedback appreciated.
I have read but not yet filled out the Self-Review Questionnare on Security and Privacy.
Known issues:
I have reviewed the TAG's API Design Principles
Open issue about 3.1 add event handler attributes WICG/spatial-navigation#60
Not following advice from 3.2, in favor of this sentence from the DOM spec:
Can consider alternative approaches, but we think the current design makes sense in this case. If you disagree, please give an example of what would be better (including how it would work with the examples in the spec).
You should also know that...
The spec isn't complete yet, so this is more of an opportunity to review the proposed API.
Unless someone raises a big issue, high level design is complete. Polyfill implementation started. Details still need more work, and native implementation is not started yet (but we will start lobbying for that soon). In other words, big changes are still possible at this stage, but it will soon start getting more expensive.
We'd prefer the TAG provide feedback as (please select one):
The text was updated successfully, but these errors were encountered: