-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: Screen Reader: Many Pages: Elements are focused in a confusing order #81063
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,7 +108,12 @@ function Composer({ | |
| ); | ||
|
|
||
| const maxHeightStyle = useMemo(() => StyleUtils.getComposerMaxHeightStyle(maxLines, isComposerFullSize), [StyleUtils, isComposerFullSize, maxLines]); | ||
| const composerStyle = useMemo(() => StyleSheet.flatten([style, textContainsOnlyEmojis ? styles.onlyEmojisTextLineHeight : {}]), [style, textContainsOnlyEmojis, styles]); | ||
|
|
||
| // Negative margin moves frame up for correct iOS VoiceOver order; padding compensates visually. See #77499. | ||
| const composerStyle = useMemo( | ||
| () => StyleSheet.flatten([style, textContainsOnlyEmojis ? styles.onlyEmojisTextLineHeight : {}, {marginTop: -5, paddingTop: 5}]), | ||
|
Comment on lines
+113
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This change adds Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense, can you please confirm this change doesn't cause the regression on Android @TaduJR ? |
||
| [style, textContainsOnlyEmojis, styles], | ||
| ); | ||
|
|
||
| return ( | ||
| <RNMarkdownTextInput | ||
|
|
||
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.
❌ CONSISTENCY-2 (docs)
The hardcoded values
-5and5are magic numbers that reduce code readability and maintainability. These accessibility-related values should be defined as named constants to clearly document their purpose.Suggested fix:
Define constants at the top of the file or in a constants file:
Then use them in the style:
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.