test: Extend getNextInputElement tests for several elements per cell #14160
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.
Description
When adding the text resource picker to the input table, the table will have cells with several interactive elements (one input field and two toggle buttons). In this case, when the user navigates using the arrow keys, it is the text field (or the combobox when in search mode) that should receive focus. This may be generalized to the first interactive element in the cell. Therefore, I have added tests that verify that this is the case. There is no need to change the actual function since it turns out that the new tests run green without modifying anything.
Note
It may be a good idea to evaluate this behaviour with some user testing. By implementing this, we are implying that arrow keys should be used to always navigate from one cell to another, and not inside the cell itself. This is also the most straightforward and simple rule to support. Implementing other kinds of behaviour might be complicated because of design system limitations, element positioning and so on.
Related Issue(s)
Verification