Handle error states and accessibility improvements

This commit is contained in:
2026-10-16 15:09:20 +02:00
parent fbd57d664f
commit 9b80580f9c
9 changed files with 139 additions and 42 deletions
+3 -2
View File
@@ -3,20 +3,21 @@ import { StyleSheet, TextInput, View } from 'react-native';
import PrimaryButton from '../PrimaryButton';
import { colors } from '../../utils/constants';
export default function ManualSearchInput({ value, onChangeText, onSubmit, placeholder = 'Produktname oder Barcode' }) {
export default function ManualSearchInput({ value, onChangeText, onSubmit, disabled = false, placeholder = 'Produktname oder Barcode' }) {
return (
<View style={styles.row}>
<TextInput
autoCapitalize="none"
onChangeText={onChangeText}
onSubmitEditing={onSubmit}
editable={!disabled}
placeholder={placeholder}
placeholderTextColor={colors.muted}
returnKeyType="search"
style={styles.input}
value={value}
/>
<PrimaryButton label="Suchen" onPress={onSubmit} />
<PrimaryButton disabled={disabled} label="Suchen" onPress={onSubmit} />
</View>
);
}
+1 -1
View File
@@ -7,7 +7,7 @@ export default function AppHeader({ title, subtitle, onBack, rightAction }) {
<View style={styles.header}>
<View style={styles.row}>
{onBack ? (
<Pressable accessibilityRole="button" onPress={onBack} style={styles.backButton}>
<Pressable accessibilityLabel="Zurück" accessibilityRole="button" onPress={onBack} style={styles.backButton}>
<Text style={styles.backText}>‹</Text>
</Pressable>
) : null}
+1
View File
@@ -16,6 +16,7 @@ export default function BottomTabBar({ activeTab, onChange }) {
const isActive = activeTab === tab.id;
return (
<Pressable
accessibilityLabel={`${tab.label} öffnen`}
accessibilityRole="button"
key={tab.id}
onPress={() => onChange(tab.id)}