Closed pixelzoom closed 6 months ago
From https://github.com/phetsims/gas-properties/issues/213#issuecomment-2014974052, here are @terracoda's thoughts on alt input:
@pixelzoom, I agree, I think the FineCoarseSpinner is a number spinner type interaction. I think the number spinners In GFLB and RaP are implemented like discrete sliders.
The FineCoarseSpinner adds a second mode to the number spinner - a single-release and bunch-release. This could be handled in different ways, so it would be good to discuss options.
One option is to make 2 tab stops (like two separate number spinners on top of each other) and have one release singles and the other release bursts, but both share the same model value total. The first Tab Stop encases the single buttons, the second Tab Stop encases the burst buttons.
Option two could use custom modifier keys on a single number spinner to release singles or bursts. E.g. arrow keys -> singles; Page Up/Page Down -->> bursts. Just an idea. Depending on keys, the appropriate button is highlighted.
There could be other options. These are just ideas.
Regardless of what we do with hotkeys or the individual push buttons, we'll need a group focus highlight. I added that in https://github.com/phetsims/scenery-phet/commit/886af758ab272a072139493c14d2d7dbc3e9e48e and it looks like this:
Looking at NumberSpinner, there seems to be more work to do there too:
For alt input, I think we will want this to behave like NumberSpinner, here is a patch and a build to help with discussion. I am not sure about the sound question.
https://phet-dev.colorado.edu/html/jg-tests/scenery-phet_en_phet.html?screens=6
Some notes from discussion with @terracoda @pixelzoom @arouinfar:
1) We want it to behave like a NumberSpinner (like the patch in https://github.com/phetsims/scenery-phet/issues/847#issuecomment-2061786929) 2) The default button sounds are acceptable. 3) We need a generalized KeyboardHelpSection for the components that use AccessibleNumberSpinner.
We need a generalized KeyboardHelpSection for the components that use AccessibleNumberSpinner.
FYI, in Gas Properties I added a placeholder for 'Spinner Controls', so that @arouinfar and I have something for designing the layout of our keyboard help dialogs. See https://github.com/phetsims/gas-properties/issues/215#issuecomment-2062565105 and SpinnerControlsKeyboardHelpSection. I'm not implying that this should inform the design or wording of what will be done for AccessibleNumberSpinner, just wanted you to be aware of it.
Examples KBH Dialogues for Sliders. @pixelzoom provides starting examples for Number spinner and coarse number spinner (previous comment).
Sliders and number spinners share a lot of functionality and behavior. They differ in visual representation. And I think that the number spinners can only have 2 step sizes (default and small) whereas sliders can have 3 (default, small and large).
Default Slider Control from Fourier
Custom Heading for Sliders in Molarity
Even More Customized in GFL
Hmm, the regular Number Spinner seems more like a slider and can have up to 3 step sizes, but the Fine Coarse Spinner seems to be limited to a default large step (or burst) and a small (or single release) with the Shift modifier.
{{Spinner || Slider || Spinner and Slider}} Controls (regular Number Spinner and Slider)
Spinner Controls (Fine Coarse Spinner)
Question: With Fine Coarse Spinner are you always adding and removing things? Just wondering if this makes more sense?
Spinner Controls (Fine Coarse Spinner Idea)
NOTE: Removed "in" before "bursts".
Assigning to @arouinfar for comment. Am I capturing everything? Tagging @jessegreenberg and @pixelzoom.
We'll need accessible text for the KBH dialog as well. I just add "with" in front of the keys, and add "arrow keys" or "key" at the end in most or all cases.
{{Spinner || Slider || Spinner and Slider}} Controls (regular Number Spinner and Slider)
Spinner Controls (Fine Coarse Spinner)
Spinner Controls (Fine Coarse Spinner Idea)
The above commits add the help content for "spinner" controls with SpinnerControlsKeyboardHelpSection. @terracoda and I met to review the look and PDOM content in the scenery-phet demo.
@pixelzoom can you please review? https://github.com/phetsims/scenery-phet/commit/f66256f4d9d86cd6e08e0985c97f2f8bc321993a can be ignored, it is an abandoned branch.
A while ago we talked about a new superclass for this. But I thought SliderControlsKeyboardHelpSection was still the appropriate class to extend for this. Let me know what you think, happy to make changes.
I'm not a fan of SliderControlsKeyboardHelpSection extends SliderControlsKeyboardHelpSection
because a spinner does not extend a slider. Probably OK for now, but I predict this will need to be changed in the future.
That said... SliderControlsKeyboardHelpSection
looks good integrated into FEL, see screenshot below. But a different problem (and probably worth a different issue) is the amount of duplication that we have between keyboard help for various UI components, as demonstrated by "Slider" and "Spinner" in this screenshot. Rather than having keyboard help for each type of UI component, it would be more usable and scalable to expand the "Basic Actions".
Yes, that is a good idea. I made a new issue for that.
because a spinner does not extend a slider. Probably OK for now, but I predict this will need to be changed in the future.
OK, understood. I am going to close this for now but will keep that in mind. Thanks!
Needed for Gas Properties suite PhET-iO release, https://github.com/phetsims/gas-properties/issues/191.
In https://github.com/phetsims/gas-properties/issues/213:
In https://github.com/phetsims/gas-properties/issues/214: