Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions js/SegmentedControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const SegmentedControl = ({
fontStyle,
activeFontStyle,
appearance,
accessibilityHintSeperator = 'out of',
}: SegmentedControlProps): React.Node => {
const colorSchemeHook = useColorScheme();
const colorScheme = appearance || colorSchemeHook;
Expand Down Expand Up @@ -99,6 +100,7 @@ const SegmentedControl = ({
<SegmentedControlTab
enabled={enabled}
selected={selectedIndex === index}
accessibilityHint={`${index + 1} ${accessibilityHintSeperator} ${values.length}`}
key={index}
value={value}
tintColor={tintColor}
Expand Down
4 changes: 4 additions & 0 deletions js/SegmentedControlTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Props = $ReadOnly<{|
activeFontStyle?: FontStyle,
tabStyle?: ViewStyle,
appearance?: 'dark' | 'light' | null,
accessibilityHint?: string,
|}>;

function isBase64(str) {
Expand All @@ -45,6 +46,7 @@ export const SegmentedControlTab = ({
activeFontStyle = {},
appearance,
tabStyle,
accessibilityHint,
}: Props): React.Node => {
const colorSchemeHook = useColorScheme();
const colorScheme = appearance || colorSchemeHook;
Expand Down Expand Up @@ -88,6 +90,8 @@ export const SegmentedControlTab = ({
style={[styles.container, tabStyle]}
disabled={!enabled}
onPress={onSelect}
accessibilityHint={accessibilityHint}
accessibilityRole="button"
accessibilityState={{selected: selected, disabled: !enabled}}>
<View style={styles.default}>
{typeof value === 'number' || typeof value === 'object' ? (
Expand Down