-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alt input for rulers and toolbox. #258
Comments
In Slack, @kathy-phet said:
Also in Slack, @emily-phet said:
|
A few misc thoughts about this topic...
|
Regarding:
It would be awesome if the design could address both buckets and toolboxes. Some related thoughts:
In an oversimplification, to me, bucket item = draggable object, while toolbox item = object that can be added to play area (once object is in play area, it may be a draggable object). |
There was discussion about alternative input features at 11/11/21 dev meeting, and I identified this issue as a "gap" in alternative input support for Geometric Optics. @zepumph offered to check in with @arouinfar to verify whether this is a "must have" for Geometric Optics release, and (if so) how to get this issue moving forward so that it can be incorporated into the release. |
@zepumph and I spoke yesterday about this issue and phetsims/a11y-research#166 (comment) - and I had a follow-up conversation this morning with @terracoda. Here's my recommendation and summary of outcomes from these discussions. I recommend that we design an interaction pattern / implementation plan for the toolbox in Geometric Optics now, decoupling the more holistic design process of interaction pattern / implementation plan for all PhET toolboxes and tools from the publication goal for Geometric Optics. Both @zepumph and @terracoda agreed with this. Reasoning: Because there are only two rulers in the toolboxes for Geometric Optics, and there is already an example of ruler interaction once out of the toolbox in Gravity Force Lab, the toolbox needs for Geometric Optics are a small subset of the total needs for all PhET toolboxes and tools. We think a reasonable solution for Geometric Optics that is likely very close to what would be implemented after a lengthier design process can be found. On 11/12/2021, @zepumph created a demo of a potential toolbox interaction with Waves: Intro, and showed this to me. Here are recommendations for refinements to this that I think would be a good starting point for design discussions for Geometric Optics, and the remaining questions @terracoda and I thought would want to be considered by the Geometric Optics team. (I'll post a more complete description of design considerations for PhET toolboxes in general in phetsims/a11y-research#166 (comment) today).
|
That sounds reasonable to me, though the PDOM will be different from "buttons" given the needs of cycling through tool items with arrow keys. Since we don't need to support description, the elements themselves can be anything, and we will add our own listeners to the toolbox in general to support the interaction. In fact we don't want each tool to be a button because then each tool will be in the focus order. @pixelzoom, I think the best path forward would be to let me know if you would like to pair once #263 is finished. I foresee that changing the very code we will need to implement this. I'm happy to help! Noting here my demo for public consumption: https://phet-dev.colorado.edu/html/waves-intro/1.2.0-altInputToolbox.1/phet/waves-intro_all_phet.html |
@zepumph can you please walk me through this demo? There are no rulers in this sim, so I'm guessing that you've implemented something for the toolbox in the upper-left corner of each screen. I also can't seem to tab into this sim. Was it published with alt input support enabled, or do I need to use some query parameter? A pointer to the relevant code would also be appreciated, thanks. |
Yes thanks for the ping. I'll frame the prototype, and then discuss how we should apply it to this sim.
That is confusing to me, I am able to use alt input on my computer. Perhaps a pair if you can't get it to work. To test the prototype launch the sim, go to the the "Water" screen, focus the stopwatch (2nd in focus order for me), and press space or enter to pull it out of the toolbox. Then you can drag it around freely with arrow keys. See phetsims/wave-interference@6781e2c and phetsims/scenery-phet@2515980 from over in phetsims/a11y-research#166 to get the code that the prototype is using. Taking the demo, and applying it to GO now (using the design from #258 (comment)). You will want to do the following:
Let me know if you want further assistance. Upon reflection, I would make all the Good luck! |
@zepumph @pixelzoom @arouinfar @terracoda @emily-phet - EM and I touched on the design behavior for this feature for Geometric Optics at one of our regular meetings shortly after the Nov 12 comments add above. Sorry I didn't summarize our discussion at that time, but since this is getting some activity again, it reminded me that I should add in the discussion content here. Basically, we discussed the "grab" feature some. I understand from EM that the "grab" behavior was found pedagogically necessary for working with the balloon in BASE during interviews with screen reader users. The "grab" behavior is different then what we have in Fourier, where you just use tab to tab to the wavelength measures and then arrows to move around without an extra "grab" step. EM mentioned in our discussion that it is an open-question that TS and she have discussed - as to whether the "grab" is needed for all sim components that have this drag interaction. And, in particular, whether "grab" is needed for components that are more secondary to the learning (e.g. not the central feature that you need students to do early on) and also for components that have a more natural cuing that you would want to move them (e.g. rulers for measuring things). EM expressed that it would be desirable to remove the "grab" interaction in cases where it is an extra interaction that is not needed, but that the design research needed to know under what conditions a "grab" step is needed just hasn't been done yet, because of other grant priorities. So, as we think about the interactions for the GO sim where we have rulers and for building out a general alt-input pattern for draggable things and tool boxes, I think we would want to design in flexibility into the code structure. Where the "grab" functionality is an option that can be opted into or out of, depending on the design needs of the sim. We can use interviews done as part of the GO sim to add to our design understandings here, on when its needed or not, although this would only be for a sim without interactive description so far. |
@kathy-phet That all sounds great. But unfortunately not totally in-sync with how I've been proceeding for many weeks now. For my part... I have almost totally rewritten the rulers in Geometric Optics, because they did not conform to the pattern that PhET uses with toolboxes. Now I'm in the process of adapting @zepumph's prototype to Geometric Optics. Adapting it involves taking sim-specific code that is currently in a branch of Wave Interference, and turning it into sim-specific code for Geometric Optics; there is no common-code support for toolboxes, and there is none planned at the moment. Therefore there is currently no option for "grab" vs some other behavior. @kathy-phet Assuming that you want me to continue on this path... When I'm done, who would you like me to assign for evaluating the implementation, and doing additional design work? |
If I'm understanding @kathy-phet 's comment correctly, I think it's important to point out the distinction between getting the rulers into/out of the toolbox, and how they behave once in the Play Area. The grab+drag interaction is for the ruler once it's out in the play area - see the pattern in GFL. Navigating to, into, and "activating" the ruler in the toolbox is different. Please see my comment here:, where I list out the interaction at the toolbox ("activating" the object to appear in the play area) and then it's behavior once in the play area (grab+drag interaction). |
What @emily-phet has described is not how @zepumph's prototype works. Once a ruler is out of the toolbox, there is no grab+drag interaction. The ruler is selected using focus traveral. And when it has focus, you can use the arrow keys to move it. Since it seems like we're not all on the same page, I'm going to stop working on this integration, and assign to @zepumph for comment. And again, I urge those involved to please test-drive the prototype. I've been proceeding under the assumption that designers have tested the prototype, and that it is indeed the desired behavior (or a good starting point). But it sounds like a test-drive has not been done. To test: 1 . Run https://phet-dev.colorado.edu/html/waves-intro/1.2.0-altInputToolbox.1/phet/waves-intro_all_phet.html |
@pixelzoom Seems reasonable to me. To be clear, @zepumph 's prototype was (in my understanding), an initial idea. He followed up with a discussion with me, and I followed up with a discussion with @terracoda, and then listed our recommendations in this comment above. I specifically state in that comment that my recommendations (after discussion with @terracoda) are refinements to that prototype, trying to make it clear that the prototype is not the exact desired behavior. Apologies for any confusion there. |
From #258 (comment):
Apparently one has to Option-Tab in Safari, or change Preferences. A Google search led me to:
This might be good info to include in some a11y developer/QA doc (if it's not already there.) |
The prototype was a starting point. Please follow #258 (comment) to implement the designed first pass for this sim. This means that instead of the ruler being a freely movable object directly out of the toolbox, it needs to be grabbed. This involves following the pattern in ISLCRulerNode for adding a KeyboardDragListener + GrabDragInteraction to a ruler. @emily-phet and I are in agreement about the steps in #258 (comment), even when they differ from the original prototype. |
In 12/16/21 design check-in, I gave a demo of 1.1.0-dev.10, and consensus was that it was a good starting point. And since 1.0 will not have voicing, it's probably good enough to publish with (given a bit of tweaking and polishing). So @kathy-phet instructed me to wait until Q1 2022 before working with @zepumph on the GrabDragInteraction piece of this. @zepumph and I did meet to review what I've done so far. He suggested adding support for a hotkey to return the ruler to the toolbox. In the process of doing that, we discovered a bug in KeyboardDragListener, see phetsims/scenery#1331. When that bug is fixed, pressing escape will return the ruler to the toolbox. @arouinfar @kathy-phet (and anyone else interested) please test drive this. And let me know how you'd like to proceed when Q1 2022 rolls around. |
@zepumph pointed out that if we use GrabDragInteraction for the rulers, then we should do the same for the other draggable things - source object (framed pictures and arrow representation), second point of interest, light sources, and projection screen. |
@pixelzoom @zepumph I've reviewed the alt input behavior in master, and I'm really happy with it. I agree with @zepumph about the consistency of interaction -- if we use grab/drag for the rulers, we should use it everywhere. However, I don't think this sim needs to use the GrabDragInteraction since we aren't supporting description/voicing. Grabbing items will add an extra keypress, and the benefit is a better screen reader experience, which isn't yet relevant. The only thing that needs further refinement is how rulers are returned to the toolbox. The rulers are too eagerly returned to the toolbox. If any part of the ruler bounds overlaps the toolbox, it will be returned. Perhaps a better rule would be that the ruler is returned if its center overlaps the toolbox. Currently, it would be impossible to use keyboard navigation to move the ruler into the proper position to measure magnification in this situation: |
I agree, it's a little too easy to cause the rulers to (accidentally) return to the toolbox. I'll start with the "center" approach, using the center point and checking for "contains". If that doesn't feel good, then we can define a rectangle at the center and check for intersection. |
The above commit returns a ruler to the toolbox when its center point is inside the toolbox. This certainly addresses the problem of unintentionally putting the ruler back in the toolbox. But I'm concerned that it may create usability issues. Questions: (1) Will users discover this, or will they have problems returning rulers to the toolbox? (2) Instead of just the center point, should we try a larger part of the ruler? (Middle third? middle quarter?) Would that address the first question? (3) If we stick with a point, should there be some (standard?) visual cue about where the point is that will return the ruler to the toolbox? (4) Should the a11y team be consulted about this? Back to @arouinfar. |
Thanks @pixelzoom the current behavior addresses my concerns about accidentally putting away a ruler.
The far more convenient way to put away the ruler is to use the esc key (which is documented in the keyboard help dialog). I could be convinced that this should be the ONLY way to put away the ruler, but I won't push for it. The ruler movement is pretty speedy, so it's more likely that users will accidentally put the ruler away rather than experience an unsuccessful attempt. However, with the current implementation, the ruler shouldn't ever be accidentally returned to the toolbox while in the neighborhood of a useful measurement.
I think the current behavior (center point) is working nicely, so my vote would be to leave it as-is. I don't know that using a portion of the ruler would work. The toolbox is rectangular, so the maximum overlap area for the two rulers would be different. The vertical ruler will almost certainly always have the maximum overlap with the toolbox when it is used to measure the magnification of the image.
I don't think we need a visual cue related to the return point. The training should really be with the hotkeys in the keyboard help dialog. With a keyboard, there is no need to physically drag the ruler back to the toolbox to put it away.
This feels like a fairly minor change that improves usability, so I am comfortable moving forward without a larger discussion. If anyone tagged in this issue feels strongly or would like to provide further input, they're certainly welcome. |
@arouinfar that all sounds good to me. That completes the work for 1.1 release, so closing. If there are changes needed for future releases (GrabDragInteraction, voicing, etc.), new issue(s) can be created. |
Related to #235 ...
Geometric Optics has a toolbox where the rulers live. There is 1 vertical ruler, and 1 horizontal ruler. It looks like this, and behaves like toolboxes in other PhET sims:
In #235 (comment), it was noted that alt input has not been done for a toolbox yet. @terracoda said:
In #235 (comment), @arouinfar said:
So before we get to implementation, there's some a11y design to be done here. Assigning to @arouinfar to discuss with the a11y team.
The text was updated successfully, but these errors were encountered: