phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

Add description to the Localization preferences tab. #930

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

This requirement was identified in https://github.com/phetsims/scenery/issues/1563, where we had a discussion about how the dynamic locale and description features interact.

@jbphet @arouinfar and I discussed this in team "J" standup meeting this morning, and concluded:

pixelzoom commented 1 year ago

@terracoda provided some specific comments in https://github.com/phetsims/scenery/issues/1563, which I'll reproduce here so that they don't get overlooked.

https://github.com/phetsims/scenery/issues/1563#issuecomment-1593111219:

I also, do not think we need to remove screen reader access to descriptions if they are available.

For the Voicing feature, which is web-based on optional, we have built-in a warning that Voicing is only available in English, and if the locale is changed after Voicing is enabled, we turn off Voicing.

For Interactive Description (screen reader accessibility), they descriptions are just there, and I strongly feel that description in English for someone who is blind is better than no description at all. Translation tool may be readily available to the user/learner, collaboration could be happening, the person may also know English.

I think however, some indication that Interactive Description is only available in English would likely be helpful. I am not sure how this can be done since, the feature cannot be turned on and off. Maybe for sims with Interactive Description, a short sentence can be added to the Localization Tab, or we can add a sentence on the General Tab for simulations with Interactive Description and maybe Voicing, though we have a working solution for Voicing?

https://github.com/phetsims/scenery/issues/1563#issuecomment-1593117928:

Add, I agree with @arouinfar that the language buttons need accessible names.

@jessegreenberg and I were discussing shortcuts for the Localization tab based on first letter to jump to a group of languages. The list of languages can be very long.

https://github.com/phetsims/scenery/issues/1563#issuecomment-1593126089:

Adding, honestly, buttons are likely not the best UI, but that's what we have at the moment.

Re warning: We could potentially use an A11y-only context response to communicate how or how not the language changes when a new language is selected.

Adding, that way only screen reader users will get the warning.

jessegreenberg commented 1 year ago

This came up during standup today for our team, I think this is on Kaleculus to work on this iteration.

@terracoda mentioned that we can get very far by setting accessible names on the buttons and adding a PDOM specific note/warning that makes it clear Interactive Description is only in English right now. That is a quick change, I will add that while @terracoda drafts that message.

zepumph commented 1 year ago

This does not block Molecule Polarity.

terracoda commented 1 year ago

We were previously discussing wording for a warning in https://github.com/phetsims/joist/issues/893, previously.

terracoda commented 1 year ago

I drafted several versions for a warning paragraph over in https://github.com/phetsims/joist/issues/893#issuecomment-1352178673, here's draft 5 which people (@Nancy-Salpepi and @kathy-phet) liked.

This paragraph will be needed for sims with Alternative Input as well as sims with Interactive Description.

Draft 5

  • Localization is for visually displayed text. Interactive Description and Voicing features, when available, are in English.

Here are several more. I made it more active and shorter.

  1. Localization changes visually displayed text. Interactive Description and Voicing features, when present, are in English only.
  2. Localization changes visually displayed text. Description features, when present, are in English only.
  3. Localization feature changes visually displayed text. Description features, when present, are in English only.
  4. Localization changes visually displayed text. Accessible descriptions, when present, remain in English.
  5. Localization only changes visually displayed text. Accessible descriptions, when present, remain in English.
  6. Localization only changes visually displayed text. Description features, when present, remain in English.
  7. Localization only changes on-screen text. Description features, when present, remain in English.

As we move forward with description implementation there could be different amounts of available description, so maybe its best to keep things general like in 7 through 12?

What do others think of these?

terracoda commented 1 year ago

@kathy-phet, do you have a preference for one?

jessegreenberg commented 1 year ago

Great, thanks @terracoda! I added accessible names to the buttons and then the option 12 content you provided. I also added an H3 specifically for this panel. Would you like to review?

terracoda commented 1 year ago

The help text sounds a bit awkward with "only" in there. I think this will work better:

And, I noticed, I hear "heading level 3, Language" just before the new paragraph. "Language" should be plural or perhaps indicate multiple available languages or translations:

So then when reading, one would hear:

Localization, selected Tab, 5 of 5 heading level 2, Localization heading level 3, Languages Localization feature translates on-screen text. Description features, when present, remain in English.

I think that will sounds very clear, even with synthetic speech.

terracoda commented 1 year ago

Actually, I think this would be better:

Localization, selected Tab, 5 of 5 heading level 2, Localization heading level 3, Languages

  1. Change language to have on-screen text translated. Description features, when present, remain in English.
  2. Change language to translate on-screen text. Description features, when present, remain in English.

I like 14, best. It's more in the regular active-help-text style and could be made visible and voiced if people so desire.

We can swap out the h3, or the help text if others think differently.

jessegreenberg commented 1 year ago

OK, updated the strings in https://github.com/phetsims/joist/commit/ce18cf571287104657da21bd55e0e415a4940ac1. Back to you @terracoda.

terracoda commented 1 year ago

It sounds great to me. Hopefully, everyone else likes it.

terracoda commented 1 year ago

And, the languages sound great, but I just happen to notice that some of the buttons are not working - they do not change the language. Maybe that's because I am using the query parameter locales=*?

@jessegreenberg, the button is very silent.

Is there a default UI sound for a button? Is that easy to add? And, if I were to create a "confirmatory context response", I would go with something like this:

These additions might be out of scope for this iteration? Need help from others on that.

jessegreenberg commented 1 year ago

but I just happen to notice that some of the buttons are not working

@terracoda and I confirmed that this was just untranslated strings remaining in English, so this is OK.

UI sound...context response

I just added the context response that we agreed on over slack, as well as the button UI sound.

We also updated the description to more accurately reflect that a hybrid of english and the language will be used. It now reads

"Change language to translate on-screen text. Additional descriptions, when present, remain in English."

@terracoda can you please verify?

terracoda commented 1 year ago

It's working great.

Chrome & VoiceOver announces "Preferences" in said language, and then the context response. That immediately demonstrates the mixing of languages which is kind of nice.

Safari just announces the context response which is less verbose, so it, too has a positive side.

Unfortunately, the VoiceOver screen reader reads words in non-roman alphabets one letter at a time. Users of languages with non-roman alphabets will quickly learn that English is likely their best option.

I think we can close.

terracoda commented 1 year ago

The button sound, sounds great now, too.

terracoda commented 1 year ago

I forgot to check the full string of the check the context response.

Can you add a period to the end of the string?

terracoda commented 1 year ago

Sorry, I missed that. I just noticed it in the A11y View.

jessegreenberg commented 1 year ago

Thanks for checking! Added in the above commit.

terracoda commented 1 year ago

Verified and closing. Thanks @jessegreenberg !