-
Notifications
You must be signed in to change notification settings - Fork 12
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
Expand functionality of AccessibleValueHandler #499
Comments
So if we were going to make checkboxes, here may be a few to look into
|
In phetsims/scenery#951 we decided not to do this. |
In #497 we decided to use |
It seems like there are still enough differences that we should proceed with factoring listeners into AccessibleValueHandler. Adding high priority label since this is blocking publication of gravity-force-lab-basics. |
I think this is the most straight forward, and will be the easiest. Now that AccessibleNumberSpinner is a |
Ill summarize my changes here:
I think those are the big things. One issue I ran into was phetsims/axon#248 which puts part of this solution on hold: // TODO: This will emit events that signify that interaction is taking place, but it is currently
// broken with axon/timer.js, see https://github.com/phetsims/axon/issues/248 Add back in as soon
// as that issue is resolved.
// this.emitKeyState( event.domEvent.keyCode, true ); Until this is fixed keyboard interaction will not work in with NumberSpinner, and there won't be any styling during keyboard interaction with NumberPicker. |
@zepumph could you please take a look at these changes to AccessibleValueHandler? Mostly, how do you feel about the new pattern where the mixing node adds input listeners from AccessibleValueHandler? Also, I have a note above Let me know if it would be best to discuss at next dev meeting. |
This is also done. I think this is ready for review. |
I don't really understand why we need to call the keydown function twice, once immediately and once after a timer.
|
Thank you for the review!
We need to separate
Thanks, added it.
In the original design of AccessibleNumberSpinner, it was decided that it was important for press and hold behavior for keys to behave similarly to press and hold behavior for mouse/touch. This timer is how we support options
In order to control timing I think we will still need both calls. |
Alright sounds good. Thanks for the quick response. |
A fix was added for phetsims/axon#248 so the TODO can be removed now. |
TODO removed and styling of the buttons is working correctly again. That was the last thing, this issue can be closed. |
In phetsims/scenery#951 @zepumph made a new type called AccessibleValueHandler that handles
aria-valuetext
for an a11y component that is driven by a NumberProperty. AccessibleSlider and AccessibleNumberSpinner are using this. There may be other things that can be moved into AccessibleValueHandler as well. For instance, the input handling of these two types are similar. AccessibleValueHandler could have functions likeOr instead of adding listeners we could just have reusable functions that do this work and add custom listeners in the subtypes.
We also mentioned in phetsims/scenery#951 we also mentioned that perhaps
aria-valuetext
andinputValue
setters of Accessibility.js could be moved into the AccessibleValueHandler trait.The text was updated successfully, but these errors were encountered: