Skip to content
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

Slider Property for if drag is coming from PDOM #536

Closed
zepumph opened this issue Oct 24, 2019 · 4 comments
Closed

Slider Property for if drag is coming from PDOM #536

zepumph opened this issue Oct 24, 2019 · 4 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Oct 24, 2019

From a few weeks ago dev meeting, in OHMS_LAW/SliderUnit, there is code that is keeping track of if the drag is from alternative input in the PDOM. This should be generalized. Likely to AccessibleSlider, but also perhaps to AccessibleValueHandler.

@jessegreenberg in AccessibleValueHandler, I feel like there is less of a notion of a "drag" or complete interactio that spans multiple inputs. Though the slider code that manages keyboard keys' state is in AccessibleValueHandler, would a Property like sliderDraggingByKeyboardProperty be more appropriate in one vs the other?

@jessegreenberg
Copy link
Contributor

I think that this should go into AccessibleValueHandler because it seems like if we want this information for sliders we will probably want it for number spinners and number pickers too.

I am not sure I understand how what will be added will be used yet. Do we need to add something specifically for a keyboard or do we want knowledge of when any kind of discrete increment/decrement occurs from alternative input?

The usage in ohms-law/SliderUnit is specific to keyboard but maybe it should work for other screen reader gestures too.

@zepumph
Copy link
Member Author

zepumph commented Oct 24, 2019

or do we want knowledge of when any kind of discrete increment/decrement occurs from alternative input?

I guess I don't understand how this could be set to a Property. It feels similar to how we only get the "click" event from buttons with a screen reader. There is no async time step between the start of an input event and when it finishes. How would we, from an input/change event, toggle this Property any more than just at the beginning and end of the listener, like (pseudo code):

        handleInput( event ) {
          if ( this._enabledProperty.get() && !this.blockInput ) {
                  this.changingFromA11yProperty.set(true);

                  // do the actual listener stuff

                  this.changingFromA11yProperty.set(false);
          }
        },

Perhaps that is all that is actually needed.

@zepumph zepumph changed the title Slider Property for is drag is coming from PDOM Slider Property for if drag is coming from PDOM Nov 19, 2019
@zepumph
Copy link
Member Author

zepumph commented Dec 5, 2019

This may be a duplicate of phetsims/scenery#1016

@zepumph
Copy link
Member Author

zepumph commented Apr 6, 2020

I now think that this is a duplicate of phetsims/scenery#1016. Over there we are trying to add more general logic to DragListener instead of just to a slider. Closing

@zepumph zepumph closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants