Skip to content

Accessibility: Add `<SkipLink />`

Administrator requested to merge tr/add-skip-link into main

Created by: umpox

closes https://github.com/sourcegraph/sourcegraph/issues/34409

Description

This PR:

  • Adds SkipLink and SkipLinkProvider components
  • Uses SkipLink for main content.
  • Supports using SkipLink in multiple places, it will be displayed/hidden automatically depending on if the React component is rendered.
    • Not necessarily required right now. But I asked about this a few times previous (e.g. here) and there has been interest in using this in other places (like search results).

https://user-images.githubusercontent.com/9516420/180215670-2e9163ae-a613-40a5-8b70-436aebbfaff6.mp4

https://user-images.githubusercontent.com/9516420/180215681-a6fd6a54-6e70-4ffe-afbc-ca1a6e2c449d.mp4

Test plan

  • Tested using a keyboard
  • Testing using a screen reader

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading