Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Navigation
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
    • Development
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. dev
  3. background-information
  4. web
  5. accessibility
  6. how-to-screen-reader

How to use a screen reader

Screen readers are tools that are used by users who are blind or have limited vision to navigate and describe webpages. It is important that we understand how to correctly use them when building our application.

Depending on the platform, there are two widely used screen readers. Although they provide different controls, they ultimately parse webpages in a similar manner. You should not feel that you need to test a page using both screen readers, one is sufficient.

VoiceOver (MacOS)

VoiceOver is already available on MacOS, no download is required.

Video tutorial

Cheatsheet

ShortcutAction
Command + F5Enable/Disable VoiceOver
ControlStop talking
Control + Option + SpaceClick
Control + Option + →Navigate to next line
Control + Option + ←Navigate to previous line
Control + Option + Command + HNavigate to next heading
Control + Option + Command + Shift + HNavigate to previous heading

NVDA (Windows)

Download at https://www.nvaccess.org/download/

Video tutorial

Cheatsheet

ShortcutAction
Control + Alt + NEnable/disable NVDA
Caps LockStop talking
EnterClick
↓Navigate to next line
↑Navigate to previous line
HNavigate to next heading
Shift + HNavigate to previous heading

Tips

  • Use aria-hidden to hide decorative elements from screen readers.
  • Use ReachUI's <VisuallyHidden /> to provide accessible text that is visually hidden from the UI. This is useful for communicating the semantic meaning of buttons or other elements which are visually represented with an icon or other purely graphical content.
    • Note: VisuallyHidden and sr-only can sometimes cause visual bugs. See this related Chromium bug report. We should only use this approach where it is not possible to use an equivalent aria- attribute.
  • Provide a more specific aria-label to elements whose exact meaning requires context around it to understand.
    • For example, in a list of items where each item also has a button associated with it, the button should be aria-labeled to more clearly indicate which item the button is for.
  • Use screenReaderAnnounce to communicate messages about implied changing state (e.g. form submission, async resolutions, or changes to on-screen data from polling).
  • Use landmark roles such as role="region" to identify areas with multiple pieces of content that users would want to navigate to easily.

On this page

  1. How to use a screen reader

    1. VoiceOver (MacOS)
    1. NVDA (Windows)
    1. Tips