diff options
author | Cynthia <cynthia@cynthia.dev> | 2024-11-03 18:18:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-03 09:18:27 -0800 |
commit | ac9d910e1e77c559eff8b32cd8412335f41074f1 (patch) | |
tree | 9963b37b460fb3b8e585268bdfb78734c80d4bc4 /src/view/com/pager/TabBar.tsx | |
parent | c580f20b5311914c3ecdd3a84f7ae13f8881f3a7 (diff) | |
download | voidsky-ac9d910e1e77c559eff8b32cd8412335f41074f1.tar.zst |
fix(a11y): avoid plain `div`s as button or tabs (#6084)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/view/com/pager/TabBar.tsx')
-rw-r--r-- | src/view/com/pager/TabBar.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/pager/TabBar.tsx b/src/view/com/pager/TabBar.tsx index 83de3775c..4e8646c60 100644 --- a/src/view/com/pager/TabBar.tsx +++ b/src/view/com/pager/TabBar.tsx @@ -118,7 +118,10 @@ export function TabBar({ ) return ( - <View testID={testID} style={[pal.view, styles.outer]}> + <View + testID={testID} + style={[pal.view, styles.outer]} + accessibilityRole="tablist"> <DraggableScrollView testID={`${testID}-selector`} horizontal={true} @@ -135,7 +138,8 @@ export function TabBar({ onLayout={e => onItemLayout(e, i)} style={styles.item} hoverStyle={pal.viewLight} - onPress={() => onPressItem(i)}> + onPress={() => onPressItem(i)} + accessibilityRole="tab"> <View style={[styles.itemInner, selected && indicatorStyle]}> <Text emoji |