Another one on accessible menu items. We make pretty heavy use of ‘isTicked’ in surge on our menus. Here’s our play mode
Unfortunately, the ‘isTicked’ parameter doesn’t seem to show up anywhere. Since its a popup menu there’s no value, the title is unchanged, etc… basically the ticked status of the menu seems invisible to screen readers, at least on macOS.
From perusing the code, it seems isTicked is only used to draw the checkmark icon.
So is there an easy way to show ‘isTicked’ in the screen readers? Right now our users find our menus a bit confusing because they have items which depend on the tick mark to show the selected state and they can’t get that in their accessible tools.
Thanks so much!
For surge, applying this diff helps a lot
diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp
index 2bbf62615..4bb526767 100644
@@ -181,7 +181,7 @@ private:
String getTitle() const override
- return itemComponent.item.text;
+ return itemComponent.item.text + (itemComponent.item.isTicked ? " (Ticked)" : "" );^M
AccessibleState getCurrentState() const override
so I have it in our release candidate (or will in an hour or so). If that helps?
FYI our accessibility testers have shared that
1: This solution is great but
2: The text
" checked" is better than
" (Ticked)" [two spaces, no punctuation] in most screen readers
Thanks for the updates here. I’ll take a look at adding this tomorrow, as part of the other menu accessibility changes we discussed recently.
After a bit more investigation, I’m not sure whether that’s the right approach. I think it’d be better to reveal the value of the item directly to the screen reader using the item’s ‘Value’. If I inspect Xcode’s menus in the Accessibility Inspector, I see that the tick-able items have a
Value property which is either “on” or “off” (or “None” if the item doesn’t have an associated value). I’ll see if I can find a nice way of doing that.
Oh yeah 100%. Properly using the value interface is the way to go. I’m just reporting how I got in the water for our release. Thanks as always!
A fix for this issue is now on develop:
Please try it out and let me know if you run into any further problems.
We are releasing next week so I will pull and test these after that and include them in our 1.1 release
So I don’t think this is quite correct. On windows our users report that the voiceover NVDA and JAWS don’t announce ticked state and seem to think the item is readonly? On mac it shows up in accesibility but not in voice over.
Here’s the full report:
Also something interesting I noticed regarding menus, the checked state isn’t reported on Windows and Mac anymore, but if I have NVDA read detailed info what’s focused with Caps+Tab, the checked items get spoken as “read only” so it sounds like the wrong attribute is being set
I’m going to restore our ‘ticked’ text for now but I think there’s some stuff still wrong here.
Thanks for reporting. I’ve had another go; the state seemed to be reported correctly in NVDA/Narrator/VoiceOver in the DemoRunner, so hopefully this will work for you too: