-
Notifications
You must be signed in to change notification settings - Fork 0
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
[juicy-tile-list]: Reordering elements does not reorder focus #57
Comments
Good point, is there a way to set it without digging into tile DOM? |
There is a Other way is to catch tab button on And the third way which I like the most, is to actually reorder the DOM. I understand, that it causes a lot of other issues, but for tabulation this would be the best. |
I think the easiest way (not fighting against the browser) would be to overwrite the value of the It would mean recursively walking the layout setup tree from top to bottom in index order and incrementing a variable, then applying value of that variable as |
How to deal with the dynamic elements? Rerun entire code on each DOM change? Also there are some focusable elements outside of the editable part of layout? |
Yeah, that would suck, especially when we switch the role of layout editor to become only a CSS generator :( Then we may need to do it in JavaScript. First clear the value of the We cannot move elements in DOM, because they might rely on a particular order in their scripts. |
Yes, looks like so. The question is how do we know when the DOM was changed and we have to re-apply tabindex value? The But it may cause performance issues for big pages, not sure about that, need some testing. |
advise from Extreme Clean Solutions Departament: ;) |
Nice idea to solve it on spec level! Unfortunately not a single response to this message in the mailing list :( Also, from proposal to spec to implementation that would take at least a year even in the most agile conditions. |
MutationObserver seems slow to me... We could detect Tab press by window |
How to determine which element is the "Next"? This example demostrates, that same visual layout may have different focus behaviour. |
We would need to choose one but make it configurable per juicy-tile-list. Left-to-right, then top-to-bottom (case 1 in think above) seems better for me, but both will fail in RTL writing systems. Correct way would be to have 4 options:
|
We may choose whatever we like, but this will be a limitation for app designers. Lets say we have a long form of fields and the focus should go from top to bottom. Some of the fields in bottom may appear after user input. Then, the app designer decides, that there are too many free space left, and wants to put this long form in two columns. |
There is a 'direction' property on every container/group already, and we could use it. |
Yeah, I agree this should be the same
|
Right now I would see solutions: Proposed solutions
External readingRelated flexbox discussions:
Tab/nav-index/tabscope related issue in SD spec:
Nav-index: |
Bad news, for 3.iv : https://www.w3.org/Bugs/Public/show_bug.cgi?id=18415 3. seems non-doable as well BTW, maybe we can move that issue to the |
Sure, can you move it? Manually or with the tool https://github.com/google/github-issue-mover |
This issue was moved to Juicy/juicy-tile-list#32 |
If input/select/a controls were reordered by priority property, then
tabindex
should also be applied.It looks ugly when focus jumps from the bottom of a form to the top or to some other place.
@warpech, @tomalec any thoughts?
The text was updated successfully, but these errors were encountered: