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

Consider moving a11y strings out of translatable strings files #1133

Closed
jessegreenberg opened this issue Jul 15, 2024 · 3 comments
Closed

Consider moving a11y strings out of translatable strings files #1133

jessegreenberg opened this issue Jul 15, 2024 · 3 comments
Assignees

Comments

@jessegreenberg
Copy link

jessegreenberg commented Jul 15, 2024

Strings that are only used for accessibility are under an a11y key in translatable strings files. This makes it so these strings are not translatable.

This is risky because

  1. Developers might use a string under a11y accidentally and then that string will not be translatable.
  2. Developers might put accessibility strings elsewhere in the file, and then they are accidentally translatable.

@jbphet suggested that a11y strings be totally removed from the translatable strings file. That may be a good way to make the behavior if i18n + a11y strings more clear.

To consider:

  • Does rosetta need to be updated with how it handles the a11y key?
  • I recommend creating new files for 'a11y' strings. JoistA11yStrings.ts or something.
  • Should they be converted to StringProperties? Do we have tooling for that or should it be done inline?
  • Do we need new tooling to 'modulify' these strings?
@jessegreenberg jessegreenberg self-assigned this Jul 15, 2024
@jessegreenberg
Copy link
Author

This issue was suggested after phetsims/joist#976. That issue would have been caught by developer and QA if a11y strings were skipped by ?stringTest. That change alone may be enough.

@jessegreenberg
Copy link
Author

From developer meeting today - Removing strings from our strings files will be a large chunk of work, and there are questions about how to best support a11y strings with typescript and tooling if we don't keep them in the strings file. There is uncertainty how a11y strings will work in the future as we consider an "description tool" to add and design descriptions.

We are going to proceed with changing the query param behavior, and revisit after we know more about the description tool.

jessegreenberg added a commit to phetsims/chipper that referenced this issue Jul 25, 2024
@jessegreenberg
Copy link
Author

The change was made above and I notified the QA team about the change to ?stringTest. Closing.

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

1 participant