-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix crash from non-adjustable unit RangeCell a11y activation #30636
Conversation
Previously, the unit picker callback was always invoked when a11y tools activated the element. This caused the app to crash whenever the element did not have adjustable units.
Size Change: 0 B Total Size: 1.42 MB ℹ️ View Unchanged
|
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.
The fix itself looks great and I tested on iOS and Android and the crash doesn't happen anymore. I tested sliders that don't have a changeable unit, too.
I had a few issues with changing the slider value on iOS, but they don't seem related at all to this PR. For completeness, they were:
- I couldn't adjust the slider value using VoiceOver. I tried two techniques:
- Single tap approach: Single tap to select the slider, drag up and down (or left and right) to adjust value: This didn't work, as I dragged different elements would become selected.
- Double tap approach: Single tap to select the slider, double tap and hold, hear the three rising tones, and swipe with one finger right or left (up and down), but the slider doesn't move.
- I could change the slider value on Android using TalkBack, but noticed one oddity:
- On a Column block, I changed the unit to px (which removes the slider), now tapping on the column area flickers the TalkBack focus but it doesn't remain on the column area (double-tapping still allows me to change the units if I like)
Tested as well and everything works as expected. 👍 Thanks for taking care of this so fast @dcalhoun ! PXL_20210409_003731824.mp4 |
* Avoid invoking possible null callback Previously, the unit picker callback was always invoked when a11y tools activated the element. This caused the app to crash whenever the element did not have adjustable units. * Add test coverage for RangeCell accessibility actions
* Release script: Update react-native-editor version to 1.50.0 * Release script: Update with changes from 'npm run core preios' * Gutenberg Plugin: Remove deprecations planned for 10.3 release (#30417) * Gutenberg Plugin: Remove deprecations planned for 10.3 release * Docs: Add changelog entry * Closed changelog for 1.50.0 * Release script: Update react-native-editor version to 1.50.1 * Release script: Update with changes from 'npm run core preios' * RNMobile: Truncate rangecell screenreader decimals (#30678) Screenreaders (VoiceOver and TalkBack) were reading values of range-cells with too much precision. For example, a Column block with three columns would read widths as 33.33333333 when it should be read as 33.3. * [RNMobile] react native bridge UBE path fix (#30650) * Fixed the asset path for the unsupported-block-editor * symlink update. * Use the default div tagName on native (#30645) Co-authored-by: Ceyhun Ozugur <[email protected]> * Fix crash from non-adjustable unit RangeCell a11y activation (#30636) * Avoid invoking possible null callback Previously, the unit picker callback was always invoked when a11y tools activated the element. This caused the app to crash whenever the element did not have adjustable units. * Add test coverage for RangeCell accessibility actions * Re-added symlink update. * Update changelog for react-native-editor Co-authored-by: Greg Ziółkowski <[email protected]> Co-authored-by: Joel Dean <[email protected]> Co-authored-by: Ceyhun Ozugur <[email protected]> Co-authored-by: David Calhoun <[email protected]>
Description
Fixes #30625. Previously, the unit picker callback was always invoked when a11y tools activated the element. This caused the app to crash whenever the element did not have adjustable units.
How has this been tested?
Following the reproduction steps outlined within #30625.
Additionally...
Expected: The app does not crash. The editor opens the unit picker.
Screenshots
n/a
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).