-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NumberSpinner description disturbed by conversion to StringProperty #869
Comments
I was able to correct the behavior with the commit shown above. In essence, the value of the string Property is now being used as the value in @pixelzoom and @jessegreenberg - Can you each please take a look at this change and see if it makes sense and isn't indicative of some larger problem? @pixelzoom made the change to a Property, and @jessegreenberg is the lead author of |
The change that I made was done as part of a larger conversion of sun components to support dynamic local by using StringProperty instead of static strings. I vaguely recall consulting @jessegreenberg about whether PDOM supported StringProperty, the answer was yes, and that is confirmed by the fact that That said.... The change that I made to AccessibleNumberSpinner was: - thisNode.setPDOMAttribute( 'aria-roledescription', numberSpinnerRoleDescriptionString );
+ thisNode.setPDOMAttribute( 'aria-roledescription', SunStrings.a11y.numberSpinnerRoleDescriptionStringProperty @jbphet's change in cba546f is: - thisNode.setPDOMAttribute( 'aria-roledescription', SunStrings.a11y.numberSpinnerRoleDescriptionStringProperty );
+ thisNode.setPDOMAttribute( 'aria-roledescription', SunStrings.a11y.numberSpinnerRoleDescriptionStringProperty.value ); ... so passing in That change should not be necessary, because |
Thanks for finding and investigating this @jbphet - Scenery should be able to take the Property, I made phetsims/scenery#1598 to find out why that didn't work. When fixed, Ill revert the change in this issue. |
This should be fixed in scenery now after phetsims/scenery@118bf97 so I reverted c260426. I tested with NVDA, and it still sounds correct. @jbphet would you like to review/confirm before closing? |
I tested @jessegreenberg's changes by verifying that the number spinners are properly described in Greenhouse Effect and Gravity Force Lab: Basics, and they are. I look over the changes, and they seem reasonable, though I don't know the PDOM code well enough to do a very thorough review. All in all, I think we're good here. Closing. |
Discovered during review of the Layer Model Screen description in Greenhouse Effect, phetsims/greenhouse-effect#374 in VoiceOver.
Typically, focus on a NumberSpinner should result in a description like, "{{value}}, {{accessible name}}, {{role/type of component}}" which is what things currently look like in the published version of Gravity Force Lab: Basics.
However, on main, instead of "vertical number spinner" VoiceOver says something like "vertical Property#123{number spinner}" as seen in Greenhouse Effect and Gravity Force Lab: Basics on main:
@jbphet hypothesizes that this is related to the conversion of strings to StringProperty, so assigning to him to investigate.
The text was updated successfully, but these errors were encountered: