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

Instrument ButtonListener with a11y #959

Closed
jessegreenberg opened this issue Apr 1, 2019 · 1 comment
Closed

Instrument ButtonListener with a11y #959

jessegreenberg opened this issue Apr 1, 2019 · 1 comment
Assignees

Comments

@jessegreenberg
Copy link
Contributor

Motivated by phetsims/sun#487.

After #888 a11y listeners can be added just like any other input listener. We have been doing this already in PressListener.

PressListener is part of a "new" set of Scenery input listeners. FireListener is part of the "new" set and is very similar to ButtonListener in its feature set. It may end up replacing ButtonListener in the future. So I was wondering if we should skip ButtonListener and proceed with FireListener instead. But we are currently in a transition phase as the "new" set of listeners are finalized. Over Slack, it was reported that ButtonListener should not yet be marked deprecated because FireListener may not be complete. So we expect the transition will take some time. For this reason, we should instrument ButtonListener now.

It looks like there is some very old (pre-PDOM) a11y code in ButtonListener already, we should start there.

@jessegreenberg
Copy link
Contributor Author

This was done, ButtonListener now responds to the click event, and activates the button in response.

It looks like there is some very old (pre-PDOM) a11y code in ButtonListener already, we should start there.

This has been removed. Old code that used to check the Pointer for an isKey flag was replaced by click focus and blur listeners to update the buttonListener overCount.

I added a TODO to mention that we will likely come back to this once #939 is sorted. At that point, we probably won't respond to click events, and instead respond to keyup and keydown events instead. This is true for all of our current listeners. Closing.

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

1 participant