phetsims / gravity-force-lab-basics

A simplified version of PhET's "Gravity Force Lab" simulation, intended for use with younger students.
GNU General Public License v3.0
3 stars 4 forks source link

Screen Reader says "10 Billion" as "one zero billion" #301

Closed stemilymill closed 2 years ago

stemilymill commented 3 years ago

For https://github.com/phetsims/qa/issues/702

Test device : Dell laptop Browser/screen reader combos: Firefox & NVDA, Chrome and JAWS

When using the Change Mass spinner, if the mass is set to 10 billion kg, the screen reader says "one zero billion kilograms" instead of "ten billion kilograms."

This did not happen in the published version.

(I'm still learning terminology, please correct me so I can improve)

jessegreenberg commented 3 years ago

Thanks @stemilymill. Normally I would say this kind of screen reader output is out of our control but since it isn't happening in the published version maybe something has changed. Ill try to get it to happen myself and then look for anything that might have changed in the formatting of the value.

jessegreenberg commented 3 years ago

Confirmed with NVDA + Firefox.

jessegreenberg commented 3 years ago

@terracoda said that maybe in the published version we were spelling out numbers like "ten". Ill check into that. If we cannot find why this is happening or if something changed in the formatting @terracoda and @emily-phet suggested we could spell out the numbers.

zepumph commented 3 years ago

I confirmed in https://phet-dev.colorado.edu/html/gravity-force-lab-basics/1.0.3/phet/gravity-force-lab-basics_a11y_view.html that the published version is using real numbers, not words:

image

There are the two items copied from each sim:

<!--On master:-->
<input data-trail-id="388-389-563-570-565-734-735-709-706-705-691" id="388-389-563-570-565-734-735-709-706-705-691"
       data-focusable="true" class="a11y-pdom-element" type="range" aria-orientation="vertical"
       aria-valuetext="2 billion kilograms" min="1" max="10" step="1" aria-valuenow="2"
       aria-roledescription="number spinner">

<!--Published version:-->
<input data-trail-id="378-465-469-640-641-619-618-617-603" id="378-465-469-640-641-619-618-617-603"
       data-focusable="true" class="a11y-sibling" type="range" aria-orientation="vertical"
       aria-valuetext="3 billion kilograms" min="1000000000" max="10000000000" step="90000000"
       aria-valuenow="3000000000" aria-roledescription="number spinner">
jessegreenberg commented 3 years ago

Thanks @zepumph, thats helpful! I just confirmed that published version does not have this bug. The biggest difference I see is the min, max, and step attributes though I am not sure why that would cause this. Ill try to isolate in an example HTML case.

jessegreenberg commented 3 years ago

I verified that this is happening in the RC. I verified that this is NOT happening in the last published version. I have not been able to find a way to reproduce this in a basic HTML example. I tried adding attributes up to the slider that is in master. Then I tried copying the exact HTML in the PDOM into a different HTML page and didnt' see this happen.

More surprising is that I just notice this is NOT happening in the unbuilt version off of master.

jessegreenberg commented 3 years ago

One difference I see between unbuilt and built is that in the built version there are directional embedding marks: image

The embedding marks are on the aria-valuetext and the aria-roledescription. These are set with setAttributeToElement of PDOMPeer, I wonder if stripEmbeddingMarks should be used there.

jessegreenberg commented 3 years ago

I just confirmed that removing the directional marks fixes this issue.

jessegreenberg commented 3 years ago

Resolved in the above commit. This has been cherry picked into the scenery gravity-force-lab-basics-1.1 release branch for GFL:B.

KatieWoe commented 2 years ago

Looks ok on Win 11