Open KatieWoe opened 9 months ago
I can duplicate this in Chrome on my Windows 11 system, and searching through the HTML for the sim while it is loaded in the browser, I found the following element:
<input data-focusable="true" class="a11y-pdom-element" data-unique-id="48-62-1109-1116-1111-1257-1256-1254-1219" id="display1-primary-48-62-1109-1116-1111-1257-1256-1254-1219" type="range" aria-valuetext="0.30000000000000004" min="0" max="0.9" step="any" aria-valuenow="0.30000000000000004" aria-orientation="horizontal" style="top: 0px; left: 0px; width: 1px; height: 1px;">
I looked at the Greenhouse-Effect-specific code for SurfaceAlbedoControl
, and it is not explicitly providing the aria-valuetext
or aria-valuenow
values, at least not that I can tell. It is providing a constrainValue
function as an option for the slider, but I added debug code and found that this was not being called during the sequence of events that leads to the long number strings. This is leading me to conclude that it is more of a common code problem, so I'm going to assign it to @jessegreenberg for him to have a look.
@jessegreenberg - This seems similar, and perhaps related, to other work that you and I did for https://github.com/phetsims/greenhouse-effect/issues/388, in case that helps. Also, it's hard for me to have much input on whether it is worth the effort to track this down and fix this problem, since I have very little idea how much it would negatively impact screen reader users. I'll leave it up to you to get input on this question if needed.
@jbphet and I reviewed this together. We can probably use the same workaround from https://github.com/phetsims/greenhouse-effect/issues/388 to constrain the precision but add an option to support greater precision in the future if needed (hopefully no one would ever need to do that).
Test device Samsung Operating System Win 11 Browser Firefox + NVDA Problem description For https://github.com/phetsims/qa/issues/1043. Found while testing https://github.com/phetsims/greenhouse-effect/issues/388, but does not seem related. On the Surface Albedo slider, if you press Shift + up/down as though to move in small increments the number read out will continue to read 0's after the number, seemingly endlessly until interrupted with another input.
Visuals
https://github.com/phetsims/greenhouse-effect/assets/41024075/d1e3fe9e-c18b-41e7-a313-72e78a68d9c4
Troubleshooting information: