From 6d6eca5b00346dcd912b58d39468c79908f3e100 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Wed, 16 Nov 2022 12:02:58 -0800 Subject: [PATCH] Fix missing 'id' and 'tabIndex' support for TextInput --- Libraries/Components/TextInput/TextInput.js | 13 +++++++++---- .../TextInput/__tests__/TextInput-test.js | 8 +------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index b0fa1a8b7f2e59..adf7e3945d76ec 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1079,6 +1079,9 @@ function InternalTextInput(props: Props): React.Node { 'aria-expanded': ariaExpanded, 'aria-selected': ariaSelected, accessibilityState, + id, + tabIndex, + ...otherProps } = props; const inputRef = useRef>>(null); @@ -1436,15 +1439,16 @@ function InternalTextInput(props: Props): React.Node { textInput = ( { allowFontScaling={true} focusable={true} forwardedRef={null} - id="id" mostRecentEventCount={0} + nativeID="id" onBlur={[Function]} onChange={[Function]} onChangeSync={null} @@ -254,7 +254,6 @@ describe('TextInput compat with web', () => { rejectResponderTermination={true} selection={null} submitBehavior="blurAndSubmit" - tabIndex={0} testID="testID" text="" underlineColorAndroid="transparent" @@ -330,8 +329,6 @@ describe('TextInput compat with web', () => { aria-activedescendant="activedescendant" aria-atomic={true} aria-autocomplete="list" - aria-busy={true} - aria-checked={true} aria-columncount={5} aria-columnindex={3} aria-columnspan={2} @@ -339,9 +336,7 @@ describe('TextInput compat with web', () => { aria-current="current" aria-describedby="describedby" aria-details="details" - aria-disabled={true} aria-errormessage="errormessage" - aria-expanded={true} aria-flowto="flowto" aria-haspopup={true} aria-hidden={true} @@ -365,7 +360,6 @@ describe('TextInput compat with web', () => { aria-rowcount={5} aria-rowindex={3} aria-rowspan={3} - aria-selected={true} aria-setsize={5} aria-sort="ascending" aria-valuemax={5}