Skip to content

Commit 465f0a8

Browse files
committed
replace deprecated focusable with tabIndex prop
1 parent 822efb5 commit 465f0a8

File tree

9 files changed

+8
-9
lines changed

9 files changed

+8
-9
lines changed

src/components/CheckboxWithLabel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function CheckboxWithLabel(props) {
107107
accessibilityLabel={props.accessibilityLabel || props.label}
108108
/>
109109
<PressableWithFeedback
110-
focusable={false}
110+
tabIndex={-1}
111111
accessible={false}
112112
onPress={toggleCheckbox}
113113
pressDimmingValue={variables.checkboxLabelActiveOpacity}

src/components/NewDatePicker/CalendarPicker/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class CalendarPicker extends React.PureComponent {
210210
onPress={() => this.onDayPressed(day)}
211211
style={styles.calendarDayRoot}
212212
accessibilityLabel={day ? day.toString() : undefined}
213-
focusable={Boolean(day)}
213+
tabIndex={Boolean(day) ? 0 : -1}
214214
accessible={Boolean(day)}
215215
>
216216
{({hovered, pressed}) => (

src/components/PDFView/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class PDFView extends Component {
232232
return (
233233
<View style={outerContainerStyle}>
234234
<View
235-
focusable
235+
tabIndex={0}
236236
style={pdfContainerStyle}
237237
onLayout={({
238238
nativeEvent: {

src/components/Pressable/GenericPressable/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const WebGenericPressable = forwardRef((props, ref) => (
1010
// change native accessibility props to web accessibility props
1111
tabIndex={!props.accessible || !props.focusable ? -1 : 0}
1212
role={props.accessibilityRole}
13-
id={props.id}
1413
aria-label={props.accessibilityLabel}
1514
aria-labelledby={props.accessibilityLabelledBy}
1615
aria-valuenow={props.accessibilityValue}

src/components/Pressable/GenericPressable/index.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import GenericPressablePropTypes from './PropTypes';
44

55
const NativeGenericPressable = forwardRef((props, ref) => (
66
<GenericPressable
7-
focusable
7+
tabIndex={0}
88
accessible
99
accessibilityHint={props.accessibilityHint || props.accessibilityLabel}
1010
// eslint-disable-next-line react/jsx-props-no-spreading

src/components/Pressable/PressableWithDelayToggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function PressableWithDelayToggle(props) {
109109
text={tooltipText}
110110
>
111111
<PressableWithoutFeedback
112-
focusable={false}
112+
tabIndex={-1}
113113
accessible={false}
114114
onPress={updatePressState}
115115
style={[styles.flexRow, ...props.styles]}

src/components/RadioButtonWithLabel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function RadioButtonWithLabel(props) {
5959
hasError={props.hasError}
6060
/>
6161
<PressableWithFeedback
62-
focusable={false}
62+
tabIndex={-1}
6363
accessible={false}
6464
onPress={() => props.onPress()}
6565
style={[styles.flexRow, styles.flexWrap, styles.flexShrink1, styles.alignItemsCenter]}

src/components/TextInput/BaseTextInput/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function BaseTextInput(props) {
246246
<View style={styles.pointerEventsNone}>
247247
<PressableWithoutFeedback
248248
onPress={onPress}
249-
focusable={false}
249+
tabIndex={-1}
250250
accessibilityLabel={props.label}
251251
style={[
252252
props.autoGrowHeight && styles.autoGrowHeightInputContainer(textInputHeight, variables.componentSizeLarge, maxHeight),

src/components/TextInput/BaseTextInput/index.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function BaseTextInput(props) {
247247
<View style={styles.pointerEventsNone}>
248248
<PressableWithoutFeedback
249249
onPress={onPress}
250-
focusable={false}
250+
tabIndex={-1}
251251
accessibilityLabel={props.label}
252252
style={[
253253
props.autoGrowHeight && styles.autoGrowHeightInputContainer(textInputHeight, variables.componentSizeLarge, maxHeight),

0 commit comments

Comments
 (0)