Skip to content

Commit

Permalink
Fix VoiceOver for single-line TextInput (#1271) (#1289)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiuam authored Jul 25, 2022
1 parent a6f2f29 commit 9b0a015
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Libraries/Text/TextInput/Singleline/RCTUITextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ - (instancetype)initWithFrame:(CGRect)frame
#if TARGET_OS_OSX // [TODO(macOS GH#774)
[self setBordered:NO];
[self setAllowsEditingTextAttributes:YES];
[self setAccessibilityRole:NSAccessibilityTextFieldRole];
[self setBackgroundColor:[NSColor clearColor]];
#endif // ]TODO(macOS GH#774)

Expand All @@ -127,7 +126,11 @@ - (void)_textDidChange

#pragma mark - Accessibility

#if !TARGET_OS_OSX // [TODO(macOS GH#774)
- (void)setIsAccessibilityElement:(BOOL)isAccessibilityElement
#else
- (void)setAccessibilityElement:(BOOL)isAccessibilityElement
#endif // ]TODO(macOS GH#774)
{
// UITextField is accessible by default (some nested views are) and disabling that is not supported.
// On iOS accessible elements cannot be nested, therefore enabling accessibility for some container view
Expand Down

0 comments on commit 9b0a015

Please sign in to comment.