phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

Use ValidatorDef.STRING_WITHOUT_TEMPLATE_VARS_VALIDATOR #53

Closed zepumph closed 1 year ago

zepumph commented 2 years ago

I noticed this validator keeps template vars out of the PDOM, but there is no such logic for the UtteranceQueue. @jessegreenberg, this describes the weird reading block case we had last Friday where there was no error for template variables.

Should be as easy as a check in each Announcer.

Assigning to both @jessegreenberg and me for whoever gets it first.

zepumph commented 2 years ago

Oops, sorry @jonathanolson, please ignore.

zepumph commented 1 year ago

Already covered in AriaLiveAnnoucner because of

https://github.com/phetsims/scenery/blob/4f32b8fb1fc56fc790f16e438b29a69bd9c123fd/js/accessibility/pdom/PDOMUtils.js#L386

Implemented for Voicing.

I tested with:

Index: js/create/view/CreateScreenView.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/create/view/CreateScreenView.ts b/js/create/view/CreateScreenView.ts
--- a/js/create/view/CreateScreenView.ts    (revision 11b7b7cf468303ba9dafd31a48326dab9844d2d3)
+++ b/js/create/view/CreateScreenView.ts    (date 1660856772860)
@@ -80,7 +80,7 @@

     const ratioLockCheckbox = new Checkbox( model.ratio.lockedProperty, ratioLockContent, {
       accessibleName: ratioAndProportionStrings.ratioLock,
-      voicingNameResponse: ratioAndProportionStrings.ratioLock,
+      voicingNameResponse: ratioAndProportionStrings.ratioLock + '{{ohboy}}',
       maxWidth: 250, // empirically determined

       checkedContextResponse: ratioAndProportionStrings.a11y.ratioLockCheckboxContextResponse,

@jessegreenberg, anything else here?

zepumph commented 1 year ago

I'm feeling pretty confident about this one! Closing