Skip to content
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
@umpox

Description

@umpox

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

  1. Fetch ranges using stencil on load.
  2. Iterate through blob view and convert ranges into buttons, with relevant onClick/focus/etc handlers
  3. WIP PR here: https://github.com/sourcegraph/sourcegraph/pull/41935

/cc @felixfbecker

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions