Main Content

Use a Screen Reader in MATLAB Online

In MATLAB® Online™, you can use a screen reader and a keyboard to interact with the Command Window, create and edit scripts and functions in the Editor, and navigate through the MATLAB desktop tools. MATLAB Online is tested with the NVDA screen reader on Windows® 10 running MATLAB Online in the Google Chrome™ browser. For more information about NVDA, see Get Help on the NV Access website.

Navigate MATLAB Using a Screen Reader

When you first start MATLAB Online, the cursor is in the Command Window. To move forward through the different areas of the MATLAB Online desktop, press Ctrl+F6 (or Command+F6 on macOS systems). To move backward, press Ctrl+Shift+F6 (or Command+Shift+F6 on macOS systems).

By default, MATLAB Online has five areas that you can navigate to:

ToolPositionDescription
ToolstripTop of desktop

By default, the toolstrip includes three tabs, Home, Plots, and Apps.

To navigate between the toolstrip tabs, use the arrow keys. To enter and navigate within the toolstrip tabs, use the Tab key.

Current Folder ToolbarTop of desktop underneath toolstrip

View and change the current folder.

Current Folder BrowserLeft side of desktop

Manage files and folders in MATLAB. Actions include viewing, creating, opening, moving, and renaming files and folders in the current folder.

Workspace BrowserLeft side of desktop underneath Current Folder browser

View and manage the contents of the workspace in MATLAB.

Command WindowMiddle of desktop

Enter individual statements at the command line and view the resulting output.

Docked figuresMiddle of desktop. Above Command WindowPlot data in embedded figures.

For example, you can use the toolstrip to send feedback about the current release:

  1. On a Windows system with the NVDA screen reader running, open a Google Chrome browser and start MATLAB Online.

  2. With the cursor in the Command Window, press Ctrl+F6 to navigate to the toolstrip. You hear:

    Toolstrip region 
    Toolstrip tab control 
    Home tab selected one of three

  3. Press the Tab key to enter the Home tab and then continue pressing the Tab key until you reach the Feedback button. You hear:

    Feedback button
    Send us feedback or report a bug

  4. Press Enter. The Send Feedback dialog opens.

For more information about the MATLAB desktop, see Change Desktop Layout.

Enter Statements in the Command Window Using a Screen Reader

As you work in MATLAB, you can enter individual statements in the Command Window using a screen reader and a keyboard.

For example:

  1. On a Windows system with the NVDA screen reader running, open a Google Chrome browser and start MATLAB Online.

  2. With the cursor in the Command Window, create a variable named x by typing this statement in the Command Window.

    x = 1

    MATLAB adds x to the workspace and displays the results in the Command Window. You hear:

    Greater greater
    X equals one

    When you hear Greater greater, the Command Window is ready for the next statement at the command-line prompt (>>).

  3. Create another variable y by entering the following statement in the Command Window.

    y = cos(x)

    You hear:

    Y equals zero point five four zero three

  4. Set the value of x to the value of y by entering the following statement in the Command Window.

    x = y

    You hear:

    X equals zero point five four zero three

  5. Save the variables from the current workspace in the file test.mat by entering the following statement in the Command Window.

    save test.mat

    MATLAB saves the file in the current folder. You hear:

    Greater greater

  6. Remove the variables from the workspace by entering the following statement in the Command Window.

    clear

    You hear:

    Greater greater

  7. Clear all text from the Command Window by entering the following statement in the Command Window.

    clc

    You hear:

    Greater greater
    The Command Window is ready for the next statement.

For more information about entering statements in the Command Window, see Enter Statements in Command Window.

Create Scripts Using a Screen Reader

Scripts are the simplest kind of program file because they have no input or output arguments. They are useful for automating series of MATLAB commands, such as computations that you have to perform repeatedly from the command line or series of commands you have to reference.

You can create and edit scripts using a screen reader and a keyboard.

For example:

  1. On a Windows system with the NVDA screen reader running, open a Google Chrome browser and start MATLAB Online.

  2. Navigate to the toolstrip by typing Ctrl+F6 until you hear:

    Toolstrip region
    Toolstrip tab control
    Home tab selected one of three

  3. Press the Tab key to enter the Home tab. The New Script button is selected. You hear:

    Home property page
    File grouping
    New script button 
    Create a new script in the current folder

  4. Press Enter to create a new script. MATLAB creates the script and opens it in the Editor. You hear:

    Untitled property page
    Edit multiline, line one

  5. Add this code that generates an array of random numbers and then calculates the size and mean of the array.

    n = 50;
    r = rand(n,1);
    
    sz = size(r)
    m = mean(r)
  6. To save the file, navigate to the toolstrip by typing Ctrl+F6 until you hear:

    Toolstrip region
    Toolstrip tab control
    Editor tab selected four of seven

    If the Home tab is selected instead, you hear:

    Home tab selected one of seven
    To select the Editor tab, press the Right Arrow key until you hear:

    Editor tab selected four of seven
  7. Press the Tab key to enter the Editor tab and then continue pressing the Tab key until you reach the Save button. You hear:

    Clickable save button
    Save all modified files
    Ctrl plus S

  8. Press Enter to save the script. Alternatively, you can save the script using the keyboard shortcut Ctrl+S. MATLAB opens the Save As dialog. You hear:

    Save as dialog
    Edit untitled.m

  9. Type Ctrl+A to select the default file name and then enter a name for the script. For example, enter the name myrandom.m. Press Enter to save the file.

  10. To run the file, navigate to the toolstrip by typing Ctrl+F6 until you hear:

    Toolstrip region
    Toolstrip tab control
    Editor tab selected four of seven

  11. Press the Tab key to enter the Editor tab and then continue pressing the Tab key until you reach the Run button. You hear:

    Run grouping
    Clickable run button
    Save and run the active file
    F5

  12. Press Enter to run the script. MATLAB runs the script and displays the output in the Command Window. You hear:

    myrandom.m property page
    Edit multiline, line 5 
    m equals mean r
    sz equals 50 1 
    m equals zero point five one seven two

    Alternatively, you can press F5 to run the script. Before pressing F5, make sure that focus is inside the script. Otherwise, pressing F5 reloads MATLAB Online in the browser.

For more information about creating scripts, see Create Scripts.

Explore Plotted Data Using a Screen Reader

Plotting data in figures allows visualization of data. They can be used to quickly survey data and display the output of code. You can explore figures using a screen reader and a keyboard.

For example:

  1. On a Windows system with the NVDA screen reader running, open a Google Chrome browser and start MATLAB Online.

  2. With the cursor in the Command Window, create a variable named x by typing this statement in the Command Window.

    x = 1:5

    MATLAB adds x to the workspace and displays the results in the Command Window.

    You hear:

    Greater greater
    X equals one two three four five

    When you hear Greater greater, the Command Window is ready for the next statement at the command-line prompt (>>).

  3. Create another variable y by entering the following statement in the Command Window.

    y = 2*x

    You hear:

    Y equals two four six eight ten

  4. Plot the data of y against the data of x by entering the following statement in the Command Window.

    plot(x,y)

    You hear:

    Figure 1
    The current axes object contains one objects of type line

  5. Add a title and legend to the figure.

    title("My Plot")
    legend

    You hear:

    Figure 1
    The current axes object contains one objects of type line

  6. Navigate to the new figure tab by typing Ctrl+F6 until you hear:

    Tab control
    Figure 1 tab selected
    Figure 1, 1 of 1

  7. Press Tab twice to select the figure axes.

    You hear:

    Figure 1
    The current axes object contains one objects of type line
    The axes object with title my plot contains one objects of type line
  8. Type NVDA Modifier Key+Space to switch to focus mode for the figure axes. By default, the NVDA Modifier Key is the Insert key.

  9. Type Ctrl+Down Arrow to select the title inside the axes.

    You hear:

    Text my plot
  10. Press Tab to select the line object. If axes contain multiple objects, press Tab to navigate through them.

For more information about exploring plotted data, see Interactively Explore Plotted Data.

Screen Reader Tips and Limitations

Reduce Blank Lines in Output

To improve the screen reader experience when working in the Command Window, suppress excess blank lines in output for the current session using the format command.

format compact;

To maintain the compact format across all future sessions, use settings to set the personal value for line spacing in output display.

s = settings;
s.matlab.commandwindow.DisplayLineSpacing.PersonalValue = 'compact';

Modifying Graphics Objects

When working with graphics objects, avoid using the property inspector to view and modify properties. Instead, view and modify graphics object properties programmatically. For example, the plot function returns a chart line object. You can use dot notation to view and set properties.

p = plot(1:10,1:10);
p.LineWidth = 3; 

Alternatively, you can set properties using name-value pair arguments when creating the object, such as plot(1:10,1:10,'LineWidth',3).

For more information about viewing and modifying graphics object properties, see Modify Graphics Objects.

Accessing MathWorks Documentation

To ensure the best experience when viewing and searching the documentation using a screen reader, open it in a separate browser tab or window at https://www.mathworks.com/help/.

Live Editor

Using a screen reader is not supported in the Live Editor. To create scripts and functions, use the Editor instead.

Related Topics