-
Notifications
You must be signed in to change notification settings - Fork 162
macOS keyboard accessibility API alignment & support #707
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
Conversation
Merge upstream into fork
| acceptsKeyboardFocus={true} | ||
| enableFocusRing={true} | ||
| validKeysDown={['a', 'b', 'x', 'rightArrow']} | ||
| validKeysDown={['g', 'Esc', 'Enter', 'ArrowLeft']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also include combination keydown input? like enter should be differently recognized from enter+ctrl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't quite have that but we do pass all modifier keys back to clients along with the key press so clients can still filter by ctrl+enter vs. enter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, late to the PRty 😉 - in RNW this is represented with the keyUpEvents prop, which is an array of objects that do specify modifier keys as well. Also, it uses down "Escape", which is correct according to the standard. The Keyboard API doc actually incorrectly uses "Esc", but RNW is doing the right thing. cc @harinikmsft
nakambo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
* Update RCTCxxBridge.mm * escape, enter support, align more tightly with win * Update tests * improve arrow js compatibility
* Update RCTCxxBridge.mm * escape, enter support, align more tightly with win * Update tests * improve arrow js compatibility
| acceptsKeyboardFocus={true} | ||
| enableFocusRing={true} | ||
| validKeysDown={['a', 'b', 'x', 'rightArrow']} | ||
| validKeysDown={['g', 'Esc', 'Enter', 'ArrowLeft']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, late to the PRty 😉 - in RNW this is represented with the keyUpEvents prop, which is an array of objects that do specify modifier keys as well. Also, it uses down "Escape", which is correct according to the standard. The Keyboard API doc actually incorrectly uses "Esc", but RNW is doing the right thing. cc @harinikmsft
| @"ArrowLeft" : @(leftArrowKey), | ||
| @"ArrowRight" : @(rightArrowKey), | ||
| @"ArrowUp" : @(upArrowKey), | ||
| @"ArrowDown" : @(downArrowKey), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These probably shouldn't be here anymore as the key property now correctly represents them.
Please select one of the following
Summary
Addresses this issue
Align more closely with the Windows API set and add
EscapeandEntersupport.Win spec
Generic Msft event handler ref
TODO: Once this merges it needs to be cherry picked into the 0.62-stable and 0.63-stable branches.
Changelog
[macOS] [Bug] - enter, escape keyboarding support
Test Plan
Tested valid keys in RNTester
Microsoft Reviewers: Open in CodeFlow