Improve support for actions involving multiple navigables#1875
Open
Improve support for actions involving multiple navigables#1875
Conversation
This makes the following changes:
* Actions are always dispatched first to the top-level traversable
rather than directly to the target navigable. It is assumed that the
action will end up interacting with the target traversable, but may
not e.g. if there is an element obscuring the target, or the focus is
in the wrong place.
* To support the above, coordinates are computed relative to the
viewport of the top-level traversable rather than the target
navigable.
* A new coordinate origin type is introduced which has the form:
```
{
type: "viewport",
context: <context id>
}
```
This is designed to allow targeting inside a specific iframe without
that iframe needing to be the target of the overall actions chain.
The existing behaviour that if the main target navigable is deleted
the action chain is terminated remains. This makes the behaviour
consistent between top-level traversables and iframes, and also
between different actions.
Member
Author
|
There are still a number of open questions here:
|
Contributor
|
@jgraham is this PR somewhat ready to get review or does it require further work? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the following changes:
Actions are always dispatched first to the top-level traversable rather than directly to the target navigable. It is assumed that the action will end up interacting with the target traversable, but may not e.g. if there is an element obscuring the target, or the focus is in the wrong place.
To support the above, coordinates are computed relative to the viewport of the top-level traversable rather than the target navigable.
A new coordinate origin type is introduced which has the form:
{ type: "viewport", context: <context id> }This is designed to allow targeting inside a specific iframe without that iframe needing to be the target of the overall actions chain.
The existing behaviour that if the main target navigable is deleted the action chain is terminated remains. This makes the behaviour consistent between top-level traversables and iframes, and also between different actions.
Preview | Diff