Skip to content

VoiceOver announces "group" on menu items with formatted labels #19656

Closed

Description

@gtritchie

In Chrome on macOS, VoiceOver adds "group" after a menu item's text, e.g. "b.R, menu item, group" in the source tab overflow menu. It happens for menu items whose label is built by AppCommand.formatMenuLabel, which most RStudio menus use, including the main menus (File > New File, Open File, ...).

formatMenuLabel lays the label out in a table (AppCommand.java#L682-L728). Only the <table> has role="presentation"; its <tr> and <td>s have no role, and the browser inserts a <tbody> without one. Chrome exposes the cell holding the label text, and the one holding the shortcut, as nameless generic nodes inside the menuitem:

menuitem "Open File...     ⌘O"
  generic ""
  generic ""

Setting role="none" on the inner tbody, tr and td elements in the DOM removes the generic nodes, leaving the menu item with only its text. A fix would write an explicit <tbody> and give it, the <tr> and each <td> role="presentation".

Found while testing #19254, where the same Chrome behavior hid the role="option" cells of SuggestBox lists.

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions