Skip to content
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

Reuse visual strings for description in MOTHA. #82

Closed
pixelzoom opened this issue Nov 7, 2024 · 6 comments
Closed

Reuse visual strings for description in MOTHA. #82

pixelzoom opened this issue Nov 7, 2024 · 6 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Nov 7, 2024

Related to #67 ...

For description strings, we are currently using the approach that was used in MOTHA. All description strings (accessibleNames and helpText) are under ModelsOfTheHydrogenAtom.a11y and no visual strings are reused.

PhET is starting to build out support for default accessibleName, where the visual string is discovered and used for accessibleName. Do we want to take advantage of this in MOTHA, or use MOTHA to prioritize building out this feature?

@pixelzoom
Copy link
Contributor Author

11/7/24 design meeting: @DianaTavares @arouinfar @kathy-phet @terracoda @LindaStegemann @ariel-phet @KatieWoe @pixelzoom

Consensus is yes. @jessegreenberg and @pixelzoom will work on this.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Nov 7, 2024

Here's an inventory of UI components used in MOTHA where accessibleName is the same as the visual string:

  • ABSwitch (from labelA and labelB constructor args)
  • AccordionBox (from options.titleNode)
  • AquaRadioButton (from labelNode constructor args)
  • Checkbox (from content constructor arg)
  • ComboBoxItem
  • Dialog (from options.title)
  • RectangularRadioButton (from options.content)

@jessegreenberg does this help with identifying which common-code UI components to prioritize?

@jessegreenberg
Copy link
Contributor

Yep, that is very helpful, thanks. Ill also make note of that in phetsims/sun#911.

pixelzoom added a commit that referenced this issue Nov 7, 2024
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Nov 8, 2024

Great. Keep me posted as the "discovery pattern" (findStringProperty) is added to UI components. Then I'll remove strings from MOTHA that are discoverable and therefore unnecessary.

@jessegreenberg
Copy link
Contributor

Ok, PDOMUtils.findStringProperty is implemented an all of the above components. @pixelzoom you should be able to remove the accessibleNames with TODOs pointing to this issue.

@pixelzoom
Copy link
Contributor Author

I've removed the strings that are now unnecessary (because they are discoverable). We are down to 12 strings for accessibleName. We also have 10 strings for helpText.

I don't see any other opportunities for using defaults here, so I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants