-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[RNMobile] Accessibility updates for StepperCell and RangeCell #29741
[RNMobile] Accessibility updates for StepperCell and RangeCell #29741
Conversation
These changes make this component easier to work with in VoiceOver by using standard accessibility actions for changing the values of this component.
Size Change: +2.63 kB (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
…ct other components using this class.
…and `RangeCell` components as self-contained units. With this change TalkBack will no longer focus on the child elements of these components during navigation.
This property controls what the screenreader announces as the “type” of the value. Default is “value” if none is provided.
da93236
to
ca49b6b
Compare
ca49b6b
to
7046b53
Compare
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.
This is looking good! I tested the functionality on a Samsung Galaxy S20 and iPhone SE. Both operated as expected.
I left a few comments and questions regarding the UX and code.
packages/components/src/mobile/bottom-sheet/range-cell.native.js
Outdated
Show resolved
Hide resolved
packages/components/src/mobile/bottom-sheet/range-cell.native.js
Outdated
Show resolved
Hide resolved
packages/components/src/mobile/bottom-sheet/range-cell.native.js
Outdated
Show resolved
Hide resolved
packages/components/src/mobile/bottom-sheet/stepper-cell/index.native.js
Outdated
Show resolved
Hide resolved
packages/components/src/mobile/bottom-sheet/stepper-cell/index.native.js
Outdated
Show resolved
Hide resolved
@dcalhoun I've addressed all the code comments. Ready for another round! 👍 |
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.
LGTM! 🎉 Tested the changes again on an iPhone SE and Samsung Galaxy S20. Everything functioned as expected. Nicely done!
Gutenberg Mobile PR
wordpress-mobile/gutenberg-mobile#3255
Description
Fixes #29359 by changing the way VoiceOver interacts with the
RangeCell
andStepperCell
components.This PR fixes #29359 and contains code changes to both
StepperCell
andRangeCell
to force theUnitControl
component to behave uniformly with iOS VoiceOver and Android TalkBack.Improvements include:
StepperCell
andRangeCell
components.Width is 60 pixels
instead ofValue is 60
. This is done with a new optionalsettingLabel
property onUnitControl
. If none is provided it will default toValue
to keep backwards compatibility.UnitControl
component now utilizes standardAccessibilityActions
for interacting with the component:increment
,decrement
, andactivate
. Theactivate
option opens the unit picker (an option that wasn’t previously available on iOS for theStepperCell
.Not included are the following future enhancement
Known Issues
When changing the number of columns setting in the Columns block on iOS with VoiceOver, you'll notice that the gesture to move to the next setting will not work. This is not related to the changes in this PR as it was happening before this change. I believe this is happening because an additional Column setting is added to the bottom sheet and then quickly removed once the number of columns is decremented again and so iOS is trying to move to a setting that isn't technically there anymore.
How has this been tested?
Tested on iOS with VoiceOver and Android with TalkBack:
iOS
Android
Screenshots
iOS VoiceOver Before
ios-voiceover-before.mp4
iOS VoiceOver After
ios-voiceover-after.mp4
Android TalkBack Before
Note: in order to get the audio for Android I had to test on an emulator which means I had to use swipe up and down gestures instead of the volume keys for these videos. The experience is much nicer on a physical device using the volume keys.
android-talkback-before.mp4
Android TalkBack After
android-talkback-after.mp4
Types of changes
Improvements to the way TalkBack and VoiceOver interact with the
UnitControl
bottom sheet setting component.Checklist: