Skip to content

Commit

Permalink
[fix] Patch more internal sources of deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
necolas committed Apr 12, 2023
1 parent 4a61c16 commit 6795738
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ const ActivityIndicator: React.AbstractComponent<
return (
<View
{...other}
accessibilityRole="progressbar"
accessibilityValueMax={1}
accessibilityValueMin={0}
aria-valuemax={1}
aria-valuemin={0}
ref={forwardedRef}
role="progressbar"
style={[styles.container, style]}
>
<View
Expand Down
4 changes: 3 additions & 1 deletion packages/react-native-web/src/exports/CheckBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type CheckBoxProps = {
disabled?: boolean,
onChange?: ?(e: any) => void,
onValueChange?: ?(e: any) => void,
readOnly?: boolean,
value?: boolean
};

Expand All @@ -35,6 +36,7 @@ const CheckBox: React.AbstractComponent<
disabled,
onChange,
onValueChange,
readOnly,
style,
value,
...other
Expand Down Expand Up @@ -64,7 +66,7 @@ const CheckBox: React.AbstractComponent<
checked: value,
disabled: disabled,
onChange: handleChange,
readOnly: ariaReadOnly || other.accessibilityReadOnly,
readOnly: readOnly || ariaReadOnly || other.accessibilityReadOnly,
ref: forwardedRef,
style: [styles.nativeControl, styles.cursorInherit],
type: 'checkbox'
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-web/src/exports/Modal/ModalContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const ModalContent: React.AbstractComponent<
return (
<View
{...rest}
accessibilityModal={true}
accessibilityRole={active ? 'dialog' : null}
aria-modal={true}
ref={forwardedRef}
role={active ? 'dialog' : null}
style={style}
>
<View style={styles.container}>{children}</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import canUseDOM from '../../modules/canUseDom';

const FocusBracket = () => {
return createElement('div', {
accessibilityRole: 'none',
role: 'none',
tabIndex: 0,
style: styles.focusBracket
});
Expand Down
10 changes: 5 additions & 5 deletions packages/react-native-web/src/exports/TextInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ const TextInput: React.AbstractComponent<
blurOnSubmit,
clearTextOnFocus,
dir,
editable = true,
editable,
enterKeyHint,
inputMode,
keyboardType = 'default',
keyboardType,
multiline = false,
numberOfLines = 1,
numberOfLines,
onBlur,
onChange,
onChangeText,
Expand All @@ -133,9 +133,9 @@ const TextInput: React.AbstractComponent<
onStartShouldSetResponderCapture,
onSubmitEditing,
placeholderTextColor,
readOnly,
readOnly = false,
returnKeyType,
rows,
rows = 1,
secureTextEntry = false,
selection,
selectTextOnFocus,
Expand Down

0 comments on commit 6795738

Please sign in to comment.