jcsteh / osara

OSARA: Open Source Accessibility for the REAPER Application
GNU General Public License v2.0
127 stars 46 forks source link

Parameters dialog: Narrator always reads value slider as 0% #758

Open pitermach opened 2 years ago

pitermach commented 2 years ago

The title pretty much explains everything. To reproduce, with Narrator running bring up the parameters dialog for a track or effect, then adjust the value using the slider. Narrator will keep reading the value as 0 (tested with osara_2022.1pre-961,04fb6f9c)

The reason I'm bringing this up is that Narrator seems to work much better in UI's built with the new Juce especially really large ones, so I found myself using it much more often when doing audio work on Windows.

jcsteh commented 2 years ago

We annotate PROPID_AC_VALUE, but this doesn't seem to carry over to UI Automation. I don't know why. Perhaps implementing the UI Automation Value pattern might fix this. Fully implementing the pattern would be tedious, so perhaps we can annotate UIA_ValueValuePropertyId and UIA_IsValuePatternAvailablePropertyId.

The reason I'm bringing this up is that Narrator seems to work much better in UI's built with the new Juce especially really large ones

A little out of scope here, but do you mean as compared to NVDA and are you talking about performance? If so, have you tried enabling NVDA's Selective UIA registration advanced setting?

pitermach commented 2 years ago

Yeah, I was mainly comparing against NVDA and JAWS to a lesser extent. Performance is actually OK most of the time. The 2 advantages Narrator has is that its find command works everywhere, not just on the web which really helps in very complex UI's which don't have many keyboard shortcuts, and it lets you adjust sliders programatically while NVDA only can move them in only one direction (Relevant NVDA issue here).

From testing various Juce plugins it looks like the standard Juce slider widget doesn't seem to have any keyboard support built in for arrow keys to adjust sliders so this problem comes up surprisingly often.

jcsteh commented 2 years ago

Dynamic annotation doesn't work for this control unfortunately. UIA Core just seems to ignore UIA_IsValuePatternAvailablePropertyId when it is annotated. That means it'll need to be a full IRawElementProviderSimple implementation... and I'm not even certain that will work. We might need IValueProvider as well.

Since we don't actually use the slider, I also experimented with just making it static text and annotating its name, role and value. That works... but then I realised that will prevent the slider from being reported as a slider on Mac, where we can't just annotate roles.

jcsteh commented 2 years ago

I can't fool it with OBJID_QUERYCLASSNAMEIDX either. This is utterly irritating.

jcsteh commented 2 years ago

Okay. I've come up with a really horrible hack that avoids the need for a fully custom UIA implementation. I'll clean it up when I get a chance and post a PR. It does change the visual layout a bit, but the visual layout for that slider is useless anyway, so I don't particularly care.