Some more a11y

This commit is contained in:
Eric Bailey
2024-01-16 11:04:54 -06:00
parent 1e02cde581
commit 7315b0d714
6 changed files with 26 additions and 7 deletions
+3
View File
@@ -41,6 +41,7 @@ type ItemProps = Omit<PressableProps, 'children' | 'style' | 'onPress'> & {
name: string
value?: boolean
onChange?: ({name, value}: {name: string; value: boolean}) => void
hasError?: boolean
style?: (state: ItemState) => ViewStyle
children: ((props: ItemState) => React.ReactNode) | React.ReactNode
}
@@ -51,6 +52,7 @@ function Item({
value = false,
disabled,
onChange,
hasError,
style,
role,
}: ItemProps) {
@@ -92,6 +94,7 @@ function Item({
aria-disabled={disabled ?? false}
aria-checked={value}
aria-labelledby={labelId}
aria-invalid={hasError}
role={role}
accessibilityRole={role as AccessibilityRole}
accessibilityState={{