Skip to content

Commit 6795738

Browse files
committed
[fix] Patch more internal sources of deprecation warnings
1 parent 4a61c16 commit 6795738

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

packages/react-native-web/src/exports/ActivityIndicator/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ const ActivityIndicator: React.AbstractComponent<
5656
return (
5757
<View
5858
{...other}
59-
accessibilityRole="progressbar"
60-
accessibilityValueMax={1}
61-
accessibilityValueMin={0}
59+
aria-valuemax={1}
60+
aria-valuemin={0}
6261
ref={forwardedRef}
62+
role="progressbar"
6363
style={[styles.container, style]}
6464
>
6565
<View

packages/react-native-web/src/exports/CheckBox/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type CheckBoxProps = {
2222
disabled?: boolean,
2323
onChange?: ?(e: any) => void,
2424
onValueChange?: ?(e: any) => void,
25+
readOnly?: boolean,
2526
value?: boolean
2627
};
2728

@@ -35,6 +36,7 @@ const CheckBox: React.AbstractComponent<
3536
disabled,
3637
onChange,
3738
onValueChange,
39+
readOnly,
3840
style,
3941
value,
4042
...other
@@ -64,7 +66,7 @@ const CheckBox: React.AbstractComponent<
6466
checked: value,
6567
disabled: disabled,
6668
onChange: handleChange,
67-
readOnly: ariaReadOnly || other.accessibilityReadOnly,
69+
readOnly: readOnly || ariaReadOnly || other.accessibilityReadOnly,
6870
ref: forwardedRef,
6971
style: [styles.nativeControl, styles.cursorInherit],
7072
type: 'checkbox'

packages/react-native-web/src/exports/Modal/ModalContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ const ModalContent: React.AbstractComponent<
5454
return (
5555
<View
5656
{...rest}
57-
accessibilityModal={true}
58-
accessibilityRole={active ? 'dialog' : null}
57+
aria-modal={true}
5958
ref={forwardedRef}
59+
role={active ? 'dialog' : null}
6060
style={style}
6161
>
6262
<View style={styles.container}>{children}</View>

packages/react-native-web/src/exports/Modal/ModalFocusTrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import canUseDOM from '../../modules/canUseDom';
2525

2626
const FocusBracket = () => {
2727
return createElement('div', {
28-
accessibilityRole: 'none',
28+
role: 'none',
2929
tabIndex: 0,
3030
style: styles.focusBracket
3131
});

packages/react-native-web/src/exports/TextInput/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ const TextInput: React.AbstractComponent<
101101
blurOnSubmit,
102102
clearTextOnFocus,
103103
dir,
104-
editable = true,
104+
editable,
105105
enterKeyHint,
106106
inputMode,
107-
keyboardType = 'default',
107+
keyboardType,
108108
multiline = false,
109-
numberOfLines = 1,
109+
numberOfLines,
110110
onBlur,
111111
onChange,
112112
onChangeText,
@@ -133,9 +133,9 @@ const TextInput: React.AbstractComponent<
133133
onStartShouldSetResponderCapture,
134134
onSubmitEditing,
135135
placeholderTextColor,
136-
readOnly,
136+
readOnly = false,
137137
returnKeyType,
138-
rows,
138+
rows = 1,
139139
secureTextEntry = false,
140140
selection,
141141
selectTextOnFocus,

0 commit comments

Comments
 (0)