phetsims / sun

User-interface components for PhET simulations, built on top of Scenery.
MIT License
4 stars 12 forks source link

Add Voicing and InteractiveHighlighting to AccordionBox #743

Closed zepumph closed 2 years ago

zepumph commented 2 years ago

From https://github.com/phetsims/ratio-and-proportion/issues/381, design in https://docs.google.com/document/d/1offJbONUg8y5Aa9kHewC9iTDtNISzna4giGt7WrpXCk/edit#heading=h.nvlwmm9fjx2v

zepumph commented 2 years ago

InteractiveHighlighting added for the title bars directly below. I'm a bit curious about this implementation. A few thoughts:

zepumph commented 2 years ago
zepumph commented 2 years ago

The voicing side of things went very smoothly here. I'm pretty much just passing everything through to the button and it just works! I love it when that happens, and it is a testament to how nice when the voicing/description/alt-input designs can all align. I will want to discuss some of the above topics with @jessegreenberg on Friday, and after I will reach out to @terracoda for a review, but first I want her to look at the sim-specific implementation.

zepumph commented 2 years ago

There is currently no way to listen to the interaction regarding expand/collapse, only the Property (which presumably means ignoring on reset/iO state etc).

That said, there is code in the ResetAllButton to disable voicing while resetting, thus I open the accordionBox and press reset and don't hear anything but "Reset All, Everything reset."

zepumph commented 2 years ago

In https://docs.google.com/document/d/1offJbONUg8y5Aa9kHewC9iTDtNISzna4giGt7WrpXCk/edit?disco=AAAAVatjjs0&usp=comment_email_discussion&usp_dm=true&ts=62222b0b @terracoda mentioned that we don't need to have the object response upon focus, so we can use the default focus listener.

zepumph commented 2 years ago

Thinks are going well in Ratio and Proportion. Ready to close.