Rustix69 left a comment (openstreetmap/openstreetmap-website#6691)

@tomhughes Sorry I didnt get to the question. Previously we were complicating 
this thing too much but after figuring out the exact issue it can be reduced 
and solved

1. The bug was mostly introduced by our own component setup, not by Bootstrap 
alone. Bootstrap’s default tab behavior is to support arrow-key navigation 
between tabs, and inactive tabs using `tabindex="-1"` is expected ARIA 
behavior.  
2. In our case, the richtext tablist includes a Help tab that is hidden on 
desktop (`d-sm-none`), while its panel content is moved into the sidebar. That 
leaves a tab control present in keyboard navigation but not actually 
visible/usable in that layout, which is what caused focus/selection to end up 
in a broken state.


I changed this to a minimal source fix:
- removed the keydown interception code
- removed the global tabindex override code
- kept Bootstrap’s default keyboard behavior
- only disabled the hidden Help tab when desktop sidebar mode is active, so 
keyboard navigation can’t land on an invisible tab target

This keeps behavior aligned with Bootstrap and reduces custom JS complexity.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6691#issuecomment-4355606432
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6691/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to