Bewerken

Share via


Accessibility tips and tricks for Visual Studio

Visual Studio has built-in accessibility features that are compatible with screen readers and other assistive technologies. Whether you want to use keyboard shortcuts to navigate the IDE, or use high-contrast themes to improve visibility, you'll find several tips & tricks on this page about how to do so.

We also cover how to use annotations to reveal useful information about your code, and also how to set audio cues for error, breakpoint, or warning events.

Screen readers

Visual Studio supports screen readers in the IDE. The following screen readers have been tested:

Save your IDE settings

You can customize your IDE experience by saving your window layout, keyboard mapping scheme, and other preferences. For more information, see Personalize the Visual Studio IDE.

Modify your IDE for high-contrast viewing

For some folks, some colors are more difficult to see. If you want more contrast as you code but don't want to use the typical "High Contrast" themes, we now offer a “Blue (Extra Contrast)” theme.

Compare the Blue theme and Blue Extra Contrast theme

Tip

See the We’ve upgraded the UI in Visual Studio 2022 blog post to learn more about the subtle color contrast ratio adjustments and a new Cascadia Code font we've added to make Visual Studio more accessible for everyone.

Use annotations to reveal useful information about your code

The Visual Studio editor includes many text "adornments" that let you know about characteristics and features at particular points on a line of code, such as screwdriver and light bulb icons, error and warning "squiggles", bookmarks, and so on. You can use the "Show Line Annotations" command set to help you discover and then navigate between these adornments.

Use the Show Line Annotations command set

Access toolbars by using keyboard shortcuts

The Visual Studio IDE has toolbars as do many tool windows. The following keyboard shortcuts help you access them.

Feature Description Keyboard shortcut
IDE toolbars Select the first button on the Standard toolbar. Alt, Ctrl+Tab
Tool window toolbars Move focus to the toolbars in a tool window.

NOTE: This works for most tool windows, but only when the focus is in a tool window. Also, you must choose the SHIFT key before the ALT key. In some tool windows, such as Team Explorer, you must hold the SHIFT key for a moment before choosing the ALT key.
Shift+Alt
Toolbars Go to the first item in the next toolbar (when a toolbar has focus). Ctrl+Tab

Git keyboard shortcuts

The Visual Studio status bar shows popup controls for quick access to various Git features. The following keyboard shortcuts help you access them.

Feature Description Keyboard shortcut
Branch Picker View, manage, and checkout branches in an active Git repository. Ctrl+Alt+F3
Repository Picker View, manage, and open Git repositories known to Visual Studio. Ctrl+Alt+F4

Other useful keyboard shortcuts

Some other useful keyboard shortcuts include the following.

Feature Description Keyboard shortcut
IDE Switch High Contrast on and off.

NOTE: Standard Windows keyboard shortcut
Left Alt+Left Shift+PrtScn
Dialog box Select or clear the check box option in a dialog box.

NOTE: Standard Windows keyboard shortcut
Spacebar
Context menus Open a context (right-click) menu.

NOTE: Standard Windows keyboard shortcut
Shift+F10
Menus Quickly access a menu item by using its accelerator keys. Choose the Alt key followed by the underlined letters in a menu to activate the command. For example, to view the Open Project dialog box in Visual Studio, you would choose Alt+F+O+P.

NOTE: Standard Windows keyboard shortcut
Alt + [letter]
Search box Use the search feature in Visual Studio. Ctrl+Q
Toolbox window Move among Toolbox tabs. Ctrl+Up arrow

and

Ctrl+Down arrow
Toolbox window Add a control from the Toolbox to a form or designer. Enter
Options dialog box: Environment > Keyboard Delete a key combination entered in the Press shortcut keys option. Backspace
Notifications tool window Open the Notifications tool window by using two keyboard shortcut key combinations, one followed by the other. Then, view a notification by using the arrow keys to select it. Ctrl+\, Ctrl+N
Data Grids Open filters in data grid column headers, such as in the references tool window. Ctrl+[arrow keys]

For a complete list, see Keyboard shortcuts in Visual Studio.

Note

The dialog boxes and menu commands you see might differ from those described in Help, depending on your active settings or edition.

Access notifications by using keyboard shortcuts

When a notification appears in the IDE, here's how you can access the Notifications window by using keyboard shortcuts:

  1. From anywhere in the IDE, press the following two keyboard shortcuts in sequence, one after the other: Ctrl+\ and then Ctrl+N.

    The Notifications window opens.

    Notifications tool window in the Visual Studio IDE

  2. Use either the Tab key or the arrow keys to select a notification.

Assign audio cues to Visual Studio program events

Starting with version 17.3 and continuing in version 17.4 & later, you can add audio cues for program events directly within Visual Studio. Specifically, you can toggle a setting so that Visual Studio plays an audio cue when the caret in the editor arrives on a line with an error, breakpoint, or warning. When you view a file in the Diff view, Visual Studio can also play an audio cue when the caret arrives on a line that's been added or removed.

To add the audio cue functionality, go to Tools > Options > Text Editor > General and select the Enable audio cues setting.

Tip

To learn more about the journey to add audio cues within Visual Studio, see the Listen Up, Visual Studio has a new feature you need to hear about! blog post.

In Visual Studio 2022 version 17.2 and earlier, you can use the Sound Control Panel in Windows to assign audio cues to Visual Studio program events. Specifically, you can assign audio cues to the following program events:

  • Breakpoint hit
  • Build canceled
  • Build failed
  • Build succeeded

Here's how to add audio cues to program events by using either Windows 11 or Windows 10.

Windows 11

  1. Select the Start button on a computer running Windows 11, and then in the Search box, type Change system sounds.

    Screenshot of the Search box in Windows 11.

  2. From the search results, select the Control Panel option for Change system sounds. (Alternatively, select the Open icon in the right panel of the search results.)

    Screenshot of the 'Change system sounds' search results in Windows 11.

  3. In the Sound dialog box, click the Sounds tab.

  4. In Program Events, scroll to Microsoft Visual Studio, and then select the sounds that you want to apply to the events that you choose.

    Screenshot of the Sounds tab of the Sound dialog box in Windows 11.

  5. Click OK.

Windows 10

  1. In the Search box on a computer running Windows 10, type Change system sounds.

    Search box in Windows 10

    (Alternatively, if you have Cortana enabled, say "Hey Cortana", and then say "Change system sounds".)

  2. Double-click Change system sounds.

    Search results in Windows 10

  3. In the Sound dialog box, click the Sounds tab.

  4. In Program Events, scroll to Microsoft Visual Studio, and then select the sounds that you want to apply to the events that you choose.

    Sounds tab of the Sound dialog box in Windows 10

  5. Click OK.