Skip to content

Restricted-mode lock icon in the main toolbar can't be reached by keyboard or identified by screen readers #19801

Description

@gtritchie

System details

RStudio Edition : Server and Desktop
RStudio Version : 2026.12 development build (Parrot Balsam)

Steps to reproduce the problem

  1. Open a project that has been marked as untrusted. The restricted-mode lock icon appears in the main toolbar, to the left of the project menu.
  2. Dismiss the "This project is restricted" dialog.
  3. Try to reach the lock icon with Tab, or with the arrow keys once focus is in the main toolbar.
  4. Inspect the icon with a screen reader.

Describe the problem in detail

Clicking the lock icon reopens the trust dialog, but it is a plain <div> with a click handler (TrustPresenter, a GWT HTML widget holding the lock SVG). It has no role and no tabindex, so:

  • It is not a Tab stop, and the main toolbar's arrow-key navigation (ToolbarKeyboardNavigation) skips it, since it only stops on buttons, form fields, links, and elements with a tabindex. Keyboard users can't open the trust dialog again after dismissing it. The showTrustRequestDialog command is visible="false", so it isn't in a menu either.
  • Screen readers don't identify it as a button. Its only text is the title tooltip ("Restricted Mode: startup files were not executed for this project"), which doesn't say what activating it does.

This fails WCAG 2.1.1 (Keyboard) and 4.1.2 (Name, Role, Value).

Describe the behavior you expected

The lock icon is a button: reachable with the toolbar's keyboard navigation, activated with Enter or Space, and announced as a button whose name says that it opens the trust dialog, for example "Restricted Mode: review project trust".

Its target size is addressed separately in #19798 (a 24×24 box).

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions