@@ -33,6 +33,9 @@ type ListHeaderProps<TItem extends ListItem> = {
3333
3434 /** Whether to prevent default focus when selecting rows */
3535 shouldPreventDefaultFocusOnSelectRow ?: boolean ;
36+
37+ /** Custom accessibility label for the select all checkbox, providing context about what is being selected */
38+ selectAllAccessibilityLabel ?: string ;
3639} ;
3740
3841function ListHeader < TItem extends ListItem > ( {
@@ -44,6 +47,7 @@ function ListHeader<TItem extends ListItem>({
4447 selectAllTextStyle,
4548 shouldShowSelectAllButton,
4649 shouldPreventDefaultFocusOnSelectRow,
50+ selectAllAccessibilityLabel,
4751} : ListHeaderProps < TItem > ) {
4852 const styles = useThemeStyles ( ) ;
4953 const { translate} = useLocalize ( ) ;
@@ -69,7 +73,7 @@ function ListHeader<TItem extends ListItem>({
6973 < View style = { [ styles . flexRow , styles . alignItemsCenter ] } >
7074 < Checkbox
7175 testID = "selection-list-select-all-checkbox"
72- accessibilityLabel = { translate ( 'accessibilityHints.selectAllItems' ) }
76+ accessibilityLabel = { selectAllAccessibilityLabel ?? translate ( 'accessibilityHints.selectAllItems' ) }
7377 isChecked = { dataDetails . allSelected }
7478 isIndeterminate = { dataDetails . someSelected }
7579 onPress = { onSelectAll }
@@ -80,7 +84,7 @@ function ListHeader<TItem extends ListItem>({
8084 < PressableWithFeedback
8185 style = { [ styles . userSelectNone , styles . flexRow , styles . alignItemsCenter ] }
8286 onPress = { onSelectAll }
83- accessibilityLabel = { translate ( 'accessibilityHints.selectAllItems' ) }
87+ accessibilityLabel = { selectAllAccessibilityLabel ?? translate ( 'accessibilityHints.selectAllItems' ) }
8488 sentryLabel = { CONST . SENTRY_LABEL . SELECTION_LIST . LIST_HEADER_SELECT_ALL }
8589 accessibilityRole = "button"
8690 accessibilityState = { { checked : dataDetails . allSelected , disabled : allDisabled } }
0 commit comments