phetsims / a11y-research

a repository to track PhETs research into accessibility, or "a11y" for short
MIT License
3 stars 0 forks source link

Precision errors cause NVDA to report values as "invalid" when using a slider #192

Open jessegreenberg opened 4 months ago

jessegreenberg commented 4 months ago

Certain values can be described as 'invalid' when using NVDA with an HTML input of type range.

For example, if you set attributes like

min: 0.1
max: 1
step: ( max - min ) / 100

The step value is then 0.009000000000000001 due to precision error. This value IS technically 'invalid' because slider values must conform to this (according to MDN)

valid values for the [...] range input types are equal to the basis for stepping - the min value and increments of the step value, up to the max value.

We believe that the browser should handle this better and we would like to report this as a bug to Mozilla.

From https://github.com/phetsims/sun/issues/873

jbphet commented 4 months ago

While I'm aware of this issue and helped to illuminate the problem in https://github.com/phetsims/sun/issues/873 and the related issue https://github.com/phetsims/greenhouse-effect/issues/388, I'm not sure what this was assigned to me. @jessegreenberg - How would you like me to contribute on this issue?

jessegreenberg commented 4 months ago

From https://github.com/phetsims/sun/issues/873#issuecomment-1944628172

JB: and also to logging one with Mozilla

JG: Sounds good, I made https://github.com/phetsims/a11y-research/issues/192. I assigned this one to both of us for whoever can get to it first.

Sorry, I should have commented this here!