From 90e3c36f033c4e212b91236dcab0063d3b40f9db Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 30 Apr 2024 11:43:41 +0800 Subject: [PATCH] replace nativeID with id --- src/components/HeaderWithBackButton/index.tsx | 2 +- src/components/OptionRow.tsx | 2 +- src/components/Pressable/GenericPressable/index.tsx | 3 +-- src/components/SelectionList/BaseListItem.tsx | 2 +- .../AppNavigator/Navigators/Overlay/BaseOverlay.tsx | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index 0cbed7a2b481..d6dbc79d9974 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -160,7 +160,7 @@ function HeaderWithBackButton({ style={[styles.touchableButtonImage]} role="button" accessibilityLabel={translate('common.back')} - nativeID={CONST.BACK_BUTTON_NATIVE_ID} + id={CONST.BACK_BUTTON_NATIVE_ID} > { if (!onSelectRow) { diff --git a/src/components/Pressable/GenericPressable/index.tsx b/src/components/Pressable/GenericPressable/index.tsx index 3d6301379155..371b4d169714 100644 --- a/src/components/Pressable/GenericPressable/index.tsx +++ b/src/components/Pressable/GenericPressable/index.tsx @@ -16,14 +16,13 @@ function WebGenericPressable({focusable = true, ...props}: PressableProps, ref: focusable={focusable} tabIndex={props.tabIndex ?? (!accessible || !focusable) ? -1 : 0} role={(props.accessibilityRole ?? props.role) as Role} - id={props.nativeID} + id={props.id} aria-label={props.accessibilityLabel} aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue?.now} aria-valuemin={props.accessibilityValue?.min} aria-valuemax={props.accessibilityValue?.max} aria-valuetext={props.accessibilityValue?.text} - nativeID={props.nativeID} dataSet={{tag: 'pressable', ...(props.noDragArea && {dragArea: false}), ...props.dataSet}} /> ); diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index b1f0141663ad..2a77d101f6b3 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -79,7 +79,7 @@ function BaseListItem({ hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, hoverStyle]} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} - nativeID={keyForList ?? ''} + id={keyForList ?? ''} style={pressableStyle} onFocus={onFocus} > diff --git a/src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx b/src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx index cc687cd77d94..656416b7e088 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx @@ -34,7 +34,7 @@ function BaseOverlay({shouldUseNativeStyles, onPress, isModalOnTheLeft = false}: onPress={onPress} accessibilityLabel={translate('common.close')} role={CONST.ROLE.BUTTON} - nativeID={CONST.OVERLAY.TOP_BUTTON_NATIVE_ID} + id={CONST.OVERLAY.TOP_BUTTON_NATIVE_ID} tabIndex={-1} />