Technical docs‎ > ‎Accessibility‎ > ‎

Accessibility features of Android Studio

This page is deprecated. Redirecting to https://developer.android.com/studio/intro/accessibility.html






This document contains information on how to use the accessibility features of Android Studio (version 2.2 and later), as well a provide recommendations to improve usability for accessibility users.

Using the keyboard

Android Studio has been optimized so that the keyboard can be used to navigate through all controls as well as for activating features. Android Studio shares many common keyboard shortcuts with IntelliJ -- a frequently used list of shortcuts can be found at https://www.jetbrains.com/idea/help/keyboard-shortcuts-you-cannot-miss.html.

However, there are currently still many UI elements that can only be activated using the object navigation (or similar) feature of your screen reader. For help with object navigation or equivalent, consult your screen reader documentation, for example http://www.nvaccess.org/files/nvda/documentation/userGuide.html#toc33 for nvda.

Activating the main (top-level) menu

  • Use F10 to activate the main menu.

    • Note: Pressing “Alt” key to activate the menu, as commonly used with other Windows apps, does not work with Android Studio.

  • Using Alt-<mnemonic of top level menu> works as expected, for example “Alt-F” for the “File” menu.

Navigating between Files and Tool Windows

  • Most tool windows can be activated using Alt-<number>. Project structure, for example, is Alt-0.

  • Use Ctrl-TAB to navigate between files and tool windows using the Switcher window. Hit Ctrl-TAB multiple times to go through all entries.

Navigation Bar

  • Another useful tool to navigate between files of the project is to use the Navigation Bar, which is activated with Alt-Home.

  • Press left/right to switch between various item in the navigation hierarchy

  • Press space to show a popup of the various entries of the current navigation hierarchy item

Code folding

By default, the Android Studio editor “folds” part of the text into expandable regions. For example, the list of “import” at the beginning of a Java source file is folded into a single line containing the text “import …”. This can make navigation confusing for accessibility users. To disable all code folding options, go to the “Editor > General > Code Folding” page of the "File | Settings" dialog.

Auto insertion features

By default, Android Studio automatically insert closing curly braces, quotes, or parentheses, which can be confusing for accessibility users. You can disable this behavior (and others) in the “Editor > General > Code Completion” page of the "File | Settings" dialog.


Similarly, you can disable the autopopup of “Code Completion” in the  “Editor > General > Smart Keys” page of the "File | Settings" dialog.

Accessing errors, warnings and code inspections

Reviewing all errors of all files in a project

Android Studio does not have a tool window dedicated to showing all errors & warnings of all files in the current project. However, when using the “Build | Make Project” action, all warning errors are written to the “Messages” tool window.

  • Use Alt-0 to activate the Messages tool window.

  • Use the Up/Down arrow keys to navigate through all messages.

  • Alternatively, use Ctrl-Alt-Up/Down to navigate through all errors from within the text editor.

Note: The “Message” tool window is accessible as of Android Studio Preview 5 (see bug https://code.google.com/p/android/issues/detail?id=198013).

Reviewing errors (and code inspections) in a single file opened in the editor

  • Use F2/Ctrl-F2 to navigate between errors in a given file.

  • By default, navigation is performed for errors only. To enable navigating to all code inspections, uncheck the “‘Next error’ action goes to high priority problems only” checkbox in the “Editor > General” page of the "File | Settings" dialog.

  • Ctrl-F1 shows a tooltip window containing the error message.

Indentation

By default, Android Studio uses the space character for indentation. This can be changed to the tab character in the “Editor > Code Style > Java” page of the "File | Settings" dialog. The “Tabs and Indents” tab page contains a “Use tab character” checkbox.

Using the layout editor

The layout editor of Android Studio is currently not fully accessible (see bug https://code.google.com/p/android/issues/detail?id=199182). A temporary workaround would be to open layout files in text mode by default. See bug https://code.google.com/p/android/issues/detail?id=199181.

As a workaround, change the Layout Editor options to check “Prefer XML Editor”. For example, this can be done using Object Navigation of NVDA:

  • open some layout file, for example activity_main.xml

  • the focus will move to the layout tree view

  • from there, press shift + tab twice to move to the toolbar of the window

  • using object navigation (NVDA) find the options button and click it

  • from the menu that shows up, click prefer XML

  • from now on, android studio will open every layout file in text view mode.

Comments