From 639a7ea3b0affe12c001c74bd23c39dc2169571f Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 2 Oct 2024 19:00:33 -0700 Subject: [PATCH] fix accessibility --- src/components/Button.tsx | 1 + src/components/NormalizedRNGHPressable.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index cc04bb254e..3a50ea2643 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -468,6 +468,7 @@ export const Button = React.forwardRef( role="button" accessibilityHint={undefined} // optional {...rest} + // @ts-ignore - this will always be a pressable ref={ref} aria-label={label} aria-pressed={state.pressed} diff --git a/src/components/NormalizedRNGHPressable.tsx b/src/components/NormalizedRNGHPressable.tsx index 351005619d..bfafb2323a 100644 --- a/src/components/NormalizedRNGHPressable.tsx +++ b/src/components/NormalizedRNGHPressable.tsx @@ -122,6 +122,8 @@ export class NormalizedRNGHPressable extends React.Component { onPressOut={this.onPressOut} onHoverIn={this.onHoverIn} onHoverOut={this.onHoverOut} + accessible={true} + accessibilityRole="button" /> ) }