On Thu, 5 Mar 2026 19:52:36 GMT, Jeremy Wood <[email protected]> wrote:

> With this PR: VoiceOver correctly identifies a JToggleButton as a "toggle 
> button" (instead of a "checkbox")
> 
> This adds the subrole of NSAccessibilityToggleSubrole (which Accessibility 
> Inspector shows as the subrole "AXToggle").
> 
> 
> In the screenshot the subrole appears as expected, and the "class" (in the 
> "element") section is different from production:
> 
> <img width="1920" height="1080" alt="toggled button fixed" 
> src="https://github.com/user-attachments/assets/b449e273-c089-4930-a968-9ea8643f3ac0";
>  />

VO announces first part correctly and then it says "To select or deselect the 
**checkbox** press Ctrl+Option+Space" Shouldn't it say toggleButton here?

src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CheckboxAccessibility.m 
line 39:

> 37: }
> 38: 
> 39: - (NSAccessibilitySubrole _Nullable)accessibilitySubrole

Since this is JToggleButton,  do we need to add this subrole to 
ButtonAccessbility.m ?

test/jdk/javax/accessibility/8379347/VoiceOverToggleButtonRole.java line 47:

> 45:                 "\"toggle button\". It should not say \"checkbox\".\n\n" +
> 46:                 "If you select the link using \"Accessibility " +
> 47:                 "Inspector\": it should identify its subrole as 
> AXToggle.";

You could use text blocks here

-------------

PR Review: https://git.openjdk.org/jdk/pull/30096#pullrequestreview-4018238446
PR Review Comment: https://git.openjdk.org/jdk/pull/30096#discussion_r2998417969
PR Review Comment: https://git.openjdk.org/jdk/pull/30096#discussion_r2998420677

Reply via email to