@@ -92,7 +92,6 @@ const TextField = (props: InternalTextFieldProps) => {
9292 readonly = false ,
9393 showMandatoryIndication,
9494 clearButtonStyle,
95- accessibilityLabel : accessibilityLabelProp ,
9695 ...others
9796 } = usePreset ( props ) ;
9897
@@ -139,37 +138,9 @@ const TextField = (props: InternalTextFieldProps) => {
139138 [ typographyStyle , colorStyle , others . style , centeredTextStyle , hasValue ] ) ;
140139 const dummyPlaceholderStyle = useMemo ( ( ) => [ inputStyle , styles . dummyPlaceholder ] , [ inputStyle ] ) ;
141140
142- const defaultAccessibilityLabel = useMemo ( ( ) => {
143- const parts : string [ ] = [ ] ;
144-
145- if ( label ) {
146- parts . push ( label ) ;
147- }
148-
149- if ( context . isMandatory ) {
150- parts . push ( 'required' ) ;
151- }
152-
153- parts . push ( 'textField' ) ;
154-
155- if ( helperText ) {
156- parts . push ( helperText ) ;
157- } else if ( placeholder ) {
158- parts . push ( placeholder ) ;
159- }
160-
161- if ( showCharCounter && others . maxLength ) {
162- parts . push ( `you can enter up to ${ others . maxLength } characters` ) ;
163- }
164-
165- return parts . join ( ', ' ) ;
166- } , [ label , context . isMandatory , helperText , placeholder , showCharCounter , others . maxLength ] ) ;
167-
168- const accessibilityLabel = accessibilityLabelProp ?? defaultAccessibilityLabel ;
169-
170141 return (
171142 < FieldContext . Provider value = { context } >
172- < View { ...containerProps } accessible accessibilityLabel = { accessibilityLabel } style = { [ margins , positionStyle , containerStyle , centeredContainerStyle ] } >
143+ < View { ...containerProps } style = { [ margins , positionStyle , containerStyle , centeredContainerStyle ] } >
173144 < View row spread style = { centeredContainerStyle } >
174145 < Label
175146 label = { label }
0 commit comments