fix(mobile): add missing accessibilityLabels across all screens
- settings.tsx: labels on sign-out, feedback type chips, submit button - capture.tsx: labels on workspace selection chips - index.tsx: labels on workspace filter chips, note card pressables - search.tsx: labels on search input, result row pressables - note/[id].tsx: labels on edit, save, cancel buttons
This commit is contained in:
parent
a4124949d1
commit
83f4953870
@ -30,6 +30,7 @@ export default function CaptureScreen() {
|
||||
const isActive = workspace.id === activeWorkspaceId;
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityLabel={`Select workspace ${workspace.name}`}
|
||||
key={workspace.id}
|
||||
onPress={() => setActiveWorkspace(workspace.id)}
|
||||
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
||||
|
||||
@ -41,6 +41,7 @@ export default function HomeScreen() {
|
||||
</View>
|
||||
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.workspaceRow}>
|
||||
<Pressable
|
||||
accessibilityLabel="Show all workspaces"
|
||||
onPress={() => setActiveWorkspace(null)}
|
||||
style={[styles.workspaceChip, activeWorkspaceId === null ? styles.workspaceChipActive : null]}
|
||||
>
|
||||
@ -53,6 +54,7 @@ export default function HomeScreen() {
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityLabel={`Filter by ${workspace.name}`}
|
||||
key={workspace.id}
|
||||
onPress={() => setActiveWorkspace(workspace.id)}
|
||||
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
||||
@ -67,7 +69,7 @@ export default function HomeScreen() {
|
||||
|
||||
{isLoading ? <Text style={styles.empty}>Loading notes…</Text> : null}
|
||||
{recentNotes.map((note: (typeof recentNotes)[number]) => (
|
||||
<Pressable key={note.id} onPress={() => router.push(`/note/${note.id}`)} style={styles.card}>
|
||||
<Pressable accessibilityLabel={`Open note ${note.title}`} key={note.id} onPress={() => router.push(`/note/${note.id}`)} style={styles.card}>
|
||||
<View style={styles.badgeRow}>
|
||||
<Text style={styles.badge}>{note.workspace}</Text>
|
||||
</View>
|
||||
|
||||
@ -39,6 +39,7 @@ export default function SearchScreen() {
|
||||
<Text style={styles.title}>Search</Text>
|
||||
<Text style={styles.scope}>Scope: {activeWorkspaceName ?? 'All workspaces'}</Text>
|
||||
<TextInput
|
||||
accessibilityLabel="Search notes"
|
||||
value={query}
|
||||
onChangeText={setQuery}
|
||||
placeholder="Search notes"
|
||||
@ -48,7 +49,7 @@ export default function SearchScreen() {
|
||||
<View style={styles.list}>
|
||||
{isLoading ? <Text style={styles.empty}>Loading searchable notes…</Text> : null}
|
||||
{results.map((note: MobileNote) => (
|
||||
<Pressable key={note.id} onPress={() => router.push(`/note/${note.id}`)} style={styles.row}>
|
||||
<Pressable accessibilityLabel={`Open note ${note.title}`} key={note.id} onPress={() => router.push(`/note/${note.id}`)} style={styles.row}>
|
||||
<Text style={styles.rowText}>{note.title}</Text>
|
||||
</Pressable>
|
||||
))}
|
||||
|
||||
@ -50,6 +50,7 @@ export default function SettingsScreen() {
|
||||
<Text style={styles.metaLabel}>Signed in as</Text>
|
||||
<Text style={styles.metaValue}>{email ?? 'Unknown account'}</Text>
|
||||
<Pressable
|
||||
accessibilityLabel="Sign out"
|
||||
style={styles.secondaryButton}
|
||||
onPress={() => {
|
||||
signOut();
|
||||
@ -67,6 +68,7 @@ export default function SettingsScreen() {
|
||||
const isActive = type === feedbackType;
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityLabel={`Select ${type} feedback type`}
|
||||
key={type}
|
||||
style={[styles.typeChip, isActive ? styles.typeChipActive : null]}
|
||||
onPress={() => setFeedbackType(type)}
|
||||
@ -95,6 +97,7 @@ export default function SettingsScreen() {
|
||||
/>
|
||||
|
||||
<Pressable
|
||||
accessibilityLabel={isSubmitting ? 'Submitting feedback' : 'Submit feedback'}
|
||||
style={[styles.primaryButton, feedbackTitle.trim().length === 0 || isSubmitting ? styles.buttonDisabled : null]}
|
||||
disabled={feedbackTitle.trim().length === 0 || isSubmitting}
|
||||
onPress={() => {
|
||||
|
||||
@ -59,6 +59,7 @@ export default function NoteDetailScreen() {
|
||||
/>
|
||||
<View style={styles.actionRow}>
|
||||
<Pressable
|
||||
accessibilityLabel="Cancel editing"
|
||||
style={styles.secondaryButton}
|
||||
onPress={() => {
|
||||
setIsEditing(false);
|
||||
@ -69,6 +70,7 @@ export default function NoteDetailScreen() {
|
||||
<Text style={styles.secondaryButtonText}>Cancel</Text>
|
||||
</Pressable>
|
||||
<Pressable
|
||||
accessibilityLabel="Save note changes"
|
||||
style={styles.primaryButton}
|
||||
onPress={async () => {
|
||||
await updateNote(noteId, draftTitle, draftBody);
|
||||
@ -82,7 +84,7 @@ export default function NoteDetailScreen() {
|
||||
) : !isLoading ? (
|
||||
<>
|
||||
<Text style={styles.body}>{selectedNote?.body ?? 'No note body is available yet.'}</Text>
|
||||
<Pressable style={styles.primaryButton} onPress={() => setIsEditing(true)}>
|
||||
<Pressable accessibilityLabel="Edit note" style={styles.primaryButton} onPress={() => setIsEditing(true)}>
|
||||
<Text style={styles.primaryButtonText}>Edit note</Text>
|
||||
</Pressable>
|
||||
</>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user