Skip to content

Commit ed4df90

Browse files
fix: FAB.Group subitems are accessibility focusable when collapsed (#4498)
1 parent b35d8ec commit ed4df90

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

example/src/Examples/FABExample.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const FABExample = () => {
145145
<FAB.Group
146146
open={open}
147147
icon={open ? 'calendar-today' : 'plus'}
148+
accessibilityLabel="Calendar FAB"
148149
toggleStackOnLongPress={toggleStackOnLongPress}
149150
actions={[
150151
{ icon: 'plus', onPress: () => {} },

src/components/FAB/FABGroup.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,9 @@ const FABGroup = ({
383383
]}
384384
pointerEvents={open ? 'box-none' : 'none'}
385385
accessibilityRole="button"
386-
importantForAccessibility="yes"
387-
accessible={true}
386+
importantForAccessibility={open ? 'yes' : 'no-hide-descendants'}
387+
accessibilityElementsHidden={!open}
388+
accessible={open}
388389
accessibilityLabel={accessibilityLabel}
389390
>
390391
{it.label && (

0 commit comments

Comments
 (0)