feat(a11y): label icon-only buttons and inputs for screen readers

Header, message action, send/stop, history, model selector and dark-mode controls had no accessible name (icon-only buttons). Adds roles/labels and selected/disabled state; no visual change.
This commit is contained in:
evandro committed 2026-10-10 04:29:33 -03:00
1 parent 0e5b38fd15
commit b441339bb4
8 files changed
+84 -7

No files matched your search

+7
View File
@@ -42,6 +42,8 @@ export function ModelSelector() {
style={[styles.headerButton, { backgroundColor: colors.cardBackground }]}
onPress={() => setModalVisible(true)}
activeOpacity={0.7}
accessibilityRole="button"
accessibilityLabel={`Model: ${activeModelName}. Tap to change`}
>
<ConnectionBadge isConnected={isConnected} compact />
<Text style={[styles.headerText, { color: colors.text }]} numberOfLines={1}>
@@ -70,6 +72,8 @@ export function ModelSelector() {
onPress={handleRefresh}
style={[styles.refreshButton, { backgroundColor: colors.cardBackground }]}
disabled={isRefreshing}
accessibilityRole="button"
accessibilityLabel="Refresh models"
>
{isRefreshing ? (
<ActivityIndicator size="small" color={colors.textMuted} />
@@ -108,6 +112,9 @@ export function ModelSelector() {
isSelected && { borderColor: colors.tint }
]}
onPress={() => handleSelect(item.id)}
accessibilityRole="button"
accessibilityLabel={item.id}
accessibilityState={{ selected: isSelected }}
>
<View style={styles.itemContent}>
<Text style={[styles.itemName, { color: colors.text }]}>