This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Code navigation accessibility: Support tab-driven keyboard navigation #42421
Open
Description
Related RFC
Description
We should allow tabbing through interactive elements in the blob view.
Acceptance criteria:
- All possible ranges of code intelligence (through stencil) on load, and converted into buttons
- These buttons should be focusable (this should be the default behavior)
- Clicking (or pressing enter) on one of these buttons should trigger the code intel hover overlays
- It should be possible to easily interact with the hover overlays without losing tab position
- The blob should be focused on load, or if a relevant action is clicked (e.g. file in sidebar)
- If the blob is loaded against a specific line, focus should be driven to that line, so tabbing will move the user to a relevant part of the blob.
- If the blob is loaded against a specific range, focus should be driven to that range. If that is not a valid button, focus should go to the nearest line at the top of the range.
Implementation
- Fetch ranges using
stencil
on load. - Iterate through blob view and convert ranges into buttons, with relevant onClick/focus/etc handlers
- WIP PR here: https://github.com/sourcegraph/sourcegraph/pull/41935
/cc @felixfbecker