phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

(Description) Duplication of name and custom role in Grab/Drag Interactions #271

Closed terracoda closed 2 years ago

terracoda commented 2 years ago

I see the following code in the inspector, and I think there is too much repetition of "Movable Chemistry book" in this interaction.

image

When using VoiceOver, I hear the following on grab:

Ideally, I should only hear:

I think to fix this issue we need to do the following:

  1. change the object names in both the aria-label attributes and the content of the draggable div elements to:
    • aria-label="Chemistry book" and aria-label="Zoomed-in Chemistry book"
    • "Chemistry book" and "Zoomed-in Chemistry book"
  2. change the custom role to aria-roledescription="movable" in both cases.

I do not hear this level of repetition in the case of the grabbed "Ruler" in Gravity Force Lab nor in the case of the grabbed "Bar Magnet" in Faraday's Law. In Balloons and Static Electricity, it is hard to tell because of timing differences, but I think the balloons are coded as above.

I think this is a common code interaction, so it's possible Friction has not been updated to the final common code? Please check on that. (edit) Please check in case there is some reason why we have done this interaction differently in Friction.

zepumph commented 2 years ago

@terracoda, I wonder, were you testing on the published version? In master this is what I see when I grab the macro book:

image

We did quite a bit of work in the common code of GrabDragInteraction when doing it for the Ruler in ISLC, so it is quite possible that much of what you were talking about is already in master.

When I test with NVDA I hear: "Chemistry book, movable" the "Grabbed, lightly on physics book"

zepumph commented 2 years ago

I created https://phet-dev.colorado.edu/html/friction/1.6.0-dev.23/phet/ so you can test more easily.

terracoda commented 2 years ago

I don't hear duplication any more in the link you gave me. https://phet-dev.colorado.edu/html/friction/1.6.0-dev.23/phet/

zepumph commented 2 years ago

Friction is set to be published this quarter, so hopefully we will have this fixed in production soon!