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

Pickable should work with a11y listeners #950

Closed
Tracked by #953
jessegreenberg opened this issue Mar 5, 2019 · 3 comments
Closed
Tracked by #953

Pickable should work with a11y listeners #950

jessegreenberg opened this issue Mar 5, 2019 · 3 comments

Comments

@jessegreenberg
Copy link
Contributor

After #888, it may be possible to use pickable with a11y listeners. We currently have checks in individual listeners against enabledProperty to determine whether or not to run functionality in the listener. It would be great if we could enable/disable this directly through pickable or some other a11y equivalent.

Referencing @zepumph in case he has any thoughts but we probably won't get to this for a little while.

@jessegreenberg
Copy link
Contributor Author

After #888 I was wondering if this was working for us for free, but I tested and observed that we are hitting listeners from a11y input when a Node has pickable false.

@zepumph
Copy link
Member

zepumph commented May 13, 2021

I believe that we have this implemented. Both inputEnabled and pickable are respected by the PDOM-specific events in Input.js.

Here is where we are making sure that pickable is respeced for PDOM input:

scenery/js/input/Input.js

Lines 1055 to 1058 in a7bfc37

// If the trail is not pickable, don't dispatch PDOM events to those targets - but we still
// dispatch with an empty trail to call listeners on the Display and Pointer.
const canFireListeners = trail.isPickable() || PDOM_UNPICKABLE_EVENTS.includes( eventType );

Note that events like focus/blur still fire. @jessegreenberg is there anything else to discuss for this issue? Or can we close it?

@zepumph
Copy link
Member

zepumph commented Aug 26, 2022

This issue is very old at this point. A11y listeners have been working well for a long time, and focus/blur are needed to provide keyboard navigation on disabled elements. I believe that we may need to improve this logic more generally over in #1220, but for now. I think we are ready to close.

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

No branches or pull requests

3 participants