phetsims / fourier-making-waves

"Fourier: Making Waves" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Add keyboard support for AmplitudeNumberDisplays. #206

Closed pixelzoom closed 2 years ago

pixelzoom commented 2 years ago

For phetsims/qa#711

AmplitudeNumberDisplay is the readout that appears above an amplitude slider. For Fourier 1.0, we decided that they would not be part of the focus traversal order.

But in light of issues like these:

... I'm concerned that we'll want to add these in the future, and that doing so is going to be a lot of work. So I'm going to add support for these now, while it's relatively easy, hidden behind a query parameter.

And I'm planning to add this to 1.0 for the next RC.

@arouinfar @kathy-phet FYI.

pixelzoom commented 2 years ago

Full support for AmplitudeNumberDisplay was added to master and 1.0 in the above commits. This includes keyboard navigation, opening the keypad by pressing Space, and emphazing its associated harmonic (in the Harmonics chart) when a AmplitudeNumberDisplay has focus. Traversal order is also set explicity via option pdomOrder in InteractiveAmplitudesChartNode.js, instead of relying on the scenery default.

All of this is hidden behind a new query parameter focusableAmplitudeNumberDisplay, of type 'flag'.

Ready for verification in the next RC.

pixelzoom commented 2 years ago

Since this is not a required feature for 1.0, I'm not going to have this verified in the next RC. If/when we want to expose this feature in a future release, we can verify then. Closing.