Skip to content

Panes hidden by zoom commands remain reachable by screen readers and Tab #19181

Closed

Description

@gtritchie

When a zoom command hides part of the workbench, the hidden panes stay in the accessibility tree and in the Tab order. Screen reader users can still navigate to them, and keyboard users can Tab onto controls they can't see.

Steps to reproduce

  1. With the default pane layout (Console on the left, TabSet1 and TabSet2 on the right), choose View > Panes > Zoom Left / Center Column. The Console fills the workbench.
  2. Use a screen reader's landmark navigation (e.g. the VoiceOver rotor), or inspect the accessibility tree in Chrome DevTools.
  3. Focus the last button in the main toolbar and press Tab.

Actual behavior

  • The accessibility tree still contains region "TabSet1" and region "TabSet2" inside main "Workbench", with all their tabs, toolbar buttons and file list rows. Both regions are 0 px wide and nothing of them is visible.
  • TabSet1 and TabSet2 still contain 19 and 39 controls that can receive focus with Tab, respectively.
  • In step 3, focus moves to the invisible "Minimize TabSet1" button.

PaneManager.zoomColumn() collapses the other columns by setting their width to 0 with setWidgetSize(). Nothing marks the collapsed column as hidden. By contrast, the hidden Source pane and the "minimized" placeholder regions carry aria-hidden and are absent from the tree.

This was observed with Zoom Left / Center Column. The other zoom commands (layoutZoomRightColumn, layoutZoomSidebar, and the single-pane zooms such as layoutZoomConsole, layoutZoomFiles, layoutZoomCurrentPane) presumably hide the remaining panes the same way and have the same problem.

WCAG 2.2

  • 1.3.1 Info and Relationships (A): the accessibility tree reports regions as present that are visually gone.
  • 2.4.3 Focus Order (A): Tab moves into controls that aren't on screen.
  • 2.4.7 Focus Visible (AA): focus lands on controls inside a 0-width column, so no focus indicator is visible.

Expected behavior

While a zoom is in effect, the panes it hides are inert: absent from the accessibility tree and unreachable by Tab or by a click. Zooming out removes inert and the panes behave as before. A11y.setInert() already exists for this and is how ModalDialogTracker hides the IDE behind a modal dialog.

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions