Skip to content

Commit

Permalink
rename back accessibility role prop
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah committed Nov 30, 2023
1 parent 1fd316c commit 630c3f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/FloatingActionButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const propTypes = {
accessibilityLabel: PropTypes.string.isRequired,

/* An accessibility role for the button */
accessibilityRole: PropTypes.string.isRequired,
role: PropTypes.string.isRequired,

...withThemeStylesPropTypes,
...withThemePropTypes,
};

const FloatingActionButton = React.forwardRef(({onPress, isActive, accessibilityLabel, accessibilityRole, theme, themeStyles}, ref) => {
const FloatingActionButton = React.forwardRef(({onPress, isActive, accessibilityLabel, role, theme, themeStyles}, ref) => {
const {translate} = useLocalize();
const fabPressable = useRef(null);
const animatedValue = useSharedValue(isActive ? 1 : 0);
Expand Down Expand Up @@ -65,7 +65,7 @@ const FloatingActionButton = React.forwardRef(({onPress, isActive, accessibility
}
}}
accessibilityLabel={accessibilityLabel}
accessibilityRole={accessibilityRole}
role={role}
pressDimmingValue={1}
onPress={(e) => {
// Drop focus to avoid blue focus ring.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function FloatingActionButtonAndPopover(props) {
/>
<FloatingActionButton
accessibilityLabel={props.translate('sidebarScreen.fabNewChatExplained')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
isActive={isCreateMenuActive}
ref={anchorRef}
onPress={() => {
Expand Down

0 comments on commit 630c3f6

Please sign in to comment.