-
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
fix: Image caption supports Voice Control #44850
Conversation
Size Change: 0 B Total Size: 1.27 MB ℹ️ View Unchanged
|
Hey @geriux. 👋🏻 I requested your review as suggested by GitHub, as you have worked on these components before. However, if you'd prefer me to request someone else, just let me know. Thanks! 🙇🏻 |
@geriux removing my review request. I overlooked a portion of the original bug issue: paragraph blocks within column blocks. I need to explore this future. Apologies. 🙇🏻 |
No problem, let me know when it's ready to be reviewed 👍 |
Disable the `accessible` status of the element wrapping the caption Rich Text whenever the caption text input is focused. This allows iOS Voice Control to take action upon the text input itself.
66307ad
to
3894d91
Compare
@geriux after researching a fix for the Columns block variant of this issue — more specifically any deeply nested block — I would like to keep this PR focused solely on the Image block caption. Resolving the deeply nested block variant introduces some really complex performance issues. 😬 So...this is now ready for review. Thank you! 🙇🏻 |
e15b69c
to
432ebdd
Compare
432ebdd
to
4c153ca
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.
LGTM! I tested this on both iOS and Android and it's working as expected. 🚀
What?
Fix iOS Voice Control support allowing moving the cursor within the caption
rich text input.
Why?
Partially addresses wordpress-mobile/WordPress-iOS#19175. This broke user expectations for how
Voice Control should interact with the text input, e.g. the ability to move the
cursor to the beginning of the input.
How?
The static
accessible
prop of the wrapping element prevented Voice Controlfrom taking action on the underlying text input. This disables the
accessible
status of the element wrapping the caption Rich Text whenever the caption text
input is focused. This allows iOS Voice Control to take action upon the text
input itself.
Testing Instructions
Test iOS Voice Control
Test iOS Voice Over/Android TalkBack
Screenshots or screencast
Voice Control Before
voice-control-before.MP4
Voice Control After
voice-control-after.MP4
Voice Over Before
voice-over-before.MP4
Voice Over After
voice-over-after.MP4
TalkBack Before
Note2
talkback-before.mp4
TalkBack After
Note2
talkback-after.mp4
Footnotes
The changes in this PR cause an additional element to be focusable via iOS Voice Over: the caption button (original) and the caption text input (new). This is less than ideal, as it is unnecessary and confusing. However, this issue preexists with Android TalkBack and preexists for Paragraphs with a placeholder value with both Android TalkBack and iOS Voice Over. Therefore, I consider it unrelated and should be addressed in a different PR, likely requiring a larger refactor of how accessibility labels are applied to rich text inputs. ↩
I was unable to determine a way to record TalkBack's audio, so the screencast only includes visual examples of the focusable elements. ↩ ↩2