Skip to content

Commit

Permalink
fix: improve screen reader experience by fixing redundant FAB.Group i…
Browse files Browse the repository at this point in the history
…tem announcements. (#4196)
  • Loading branch information
abdulbasithqb authored Jan 8, 2024
1 parent 220ae16 commit 3ebc86a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/components/FAB/FABGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ const FABGroup = ({
},
]}
pointerEvents={open ? 'box-none' : 'none'}
accessibilityRole="button"
importantForAccessibility="yes"
accessible={true}
accessibilityLabel={accessibilityLabel}
>
{it.label && (
<View>
Expand All @@ -392,8 +396,8 @@ const FABGroup = ({
close();
}}
accessibilityHint={it.accessibilityHint}
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden={true}
style={[
styles.containerStyle,
{
Expand All @@ -410,6 +414,8 @@ const FABGroup = ({
>
<Text
variant="titleMedium"
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden={true}
style={[labelTextStyle, it.labelStyle]}
maxFontSizeMultiplier={it.labelMaxFontSizeMultiplier}
>
Expand All @@ -431,13 +437,13 @@ const FABGroup = ({
isV3 && { transform: [{ translateY: translations[i] }] },
it.style,
]}
accessibilityElementsHidden={true}
theme={theme}
onPress={(e) => {
it.onPress(e);
close();
}}
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
importantForAccessibility="no-hide-descendants"
testID={it.testID}
visible={open}
rippleColor={it.rippleColor}
Expand Down

0 comments on commit 3ebc86a

Please sign in to comment.