fix(multiple): change aria keyboard manager to only handle repeated events in correct places#32728
Open
adolgachev wants to merge 1 commit intoangular:mainfrom
Open
fix(multiple): change aria keyboard manager to only handle repeated events in correct places#32728adolgachev wants to merge 1 commit intoangular:mainfrom
adolgachev wants to merge 1 commit intoangular:mainfrom
Conversation
366dfa3 to
4c5c3e0
Compare
4c5c3e0 to
f75d2e2
Compare
…vents in correct places
e65f6c8 to
35c6305
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The angular-aria keyboard manager ignores the event.repeat parameter so holding down a key will cause it to loop even when that behavior is not desired. In general, repeated events should only be handled when navigating with arrow keys, and especially not when toggling (as then it just goes from off to on to off and so on).
Another issue is that the browser can interpret a keyboard space or enter as a click in certain cases. This is true with the toolbar so added check for a proper mouse event to handle the click (else already handled with keyboard) as well as updated spec to pass a proper event.
Note: we are missing tests for this but they probably need to be added at a higher level so that we can catch for not just the repeat issue but also issues like the click above. Else can just add explicit repeat but keyDown events but that isn't as useful.
Fixes b/479281429.