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;
|
const isActive = workspace.id === activeWorkspaceId;
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel={`Select workspace ${workspace.name}`}
|
||||||
key={workspace.id}
|
key={workspace.id}
|
||||||
onPress={() => setActiveWorkspace(workspace.id)}
|
onPress={() => setActiveWorkspace(workspace.id)}
|
||||||
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
||||||
|
|||||||
@ -41,6 +41,7 @@ export default function HomeScreen() {
|
|||||||
</View>
|
</View>
|
||||||
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.workspaceRow}>
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.workspaceRow}>
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel="Show all workspaces"
|
||||||
onPress={() => setActiveWorkspace(null)}
|
onPress={() => setActiveWorkspace(null)}
|
||||||
style={[styles.workspaceChip, activeWorkspaceId === null ? styles.workspaceChipActive : null]}
|
style={[styles.workspaceChip, activeWorkspaceId === null ? styles.workspaceChipActive : null]}
|
||||||
>
|
>
|
||||||
@ -53,6 +54,7 @@ export default function HomeScreen() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel={`Filter by ${workspace.name}`}
|
||||||
key={workspace.id}
|
key={workspace.id}
|
||||||
onPress={() => setActiveWorkspace(workspace.id)}
|
onPress={() => setActiveWorkspace(workspace.id)}
|
||||||
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
style={[styles.workspaceChip, isActive ? styles.workspaceChipActive : null]}
|
||||||
@ -67,7 +69,7 @@ export default function HomeScreen() {
|
|||||||
|
|
||||||
{isLoading ? <Text style={styles.empty}>Loading notes…</Text> : null}
|
{isLoading ? <Text style={styles.empty}>Loading notes…</Text> : null}
|
||||||
{recentNotes.map((note: (typeof recentNotes)[number]) => (
|
{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}>
|
<View style={styles.badgeRow}>
|
||||||
<Text style={styles.badge}>{note.workspace}</Text>
|
<Text style={styles.badge}>{note.workspace}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@ -39,6 +39,7 @@ export default function SearchScreen() {
|
|||||||
<Text style={styles.title}>Search</Text>
|
<Text style={styles.title}>Search</Text>
|
||||||
<Text style={styles.scope}>Scope: {activeWorkspaceName ?? 'All workspaces'}</Text>
|
<Text style={styles.scope}>Scope: {activeWorkspaceName ?? 'All workspaces'}</Text>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
accessibilityLabel="Search notes"
|
||||||
value={query}
|
value={query}
|
||||||
onChangeText={setQuery}
|
onChangeText={setQuery}
|
||||||
placeholder="Search notes"
|
placeholder="Search notes"
|
||||||
@ -48,7 +49,7 @@ export default function SearchScreen() {
|
|||||||
<View style={styles.list}>
|
<View style={styles.list}>
|
||||||
{isLoading ? <Text style={styles.empty}>Loading searchable notes…</Text> : null}
|
{isLoading ? <Text style={styles.empty}>Loading searchable notes…</Text> : null}
|
||||||
{results.map((note: MobileNote) => (
|
{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>
|
<Text style={styles.rowText}>{note.title}</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@ -50,6 +50,7 @@ export default function SettingsScreen() {
|
|||||||
<Text style={styles.metaLabel}>Signed in as</Text>
|
<Text style={styles.metaLabel}>Signed in as</Text>
|
||||||
<Text style={styles.metaValue}>{email ?? 'Unknown account'}</Text>
|
<Text style={styles.metaValue}>{email ?? 'Unknown account'}</Text>
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel="Sign out"
|
||||||
style={styles.secondaryButton}
|
style={styles.secondaryButton}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
signOut();
|
signOut();
|
||||||
@ -67,6 +68,7 @@ export default function SettingsScreen() {
|
|||||||
const isActive = type === feedbackType;
|
const isActive = type === feedbackType;
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel={`Select ${type} feedback type`}
|
||||||
key={type}
|
key={type}
|
||||||
style={[styles.typeChip, isActive ? styles.typeChipActive : null]}
|
style={[styles.typeChip, isActive ? styles.typeChipActive : null]}
|
||||||
onPress={() => setFeedbackType(type)}
|
onPress={() => setFeedbackType(type)}
|
||||||
@ -95,6 +97,7 @@ export default function SettingsScreen() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel={isSubmitting ? 'Submitting feedback' : 'Submit feedback'}
|
||||||
style={[styles.primaryButton, feedbackTitle.trim().length === 0 || isSubmitting ? styles.buttonDisabled : null]}
|
style={[styles.primaryButton, feedbackTitle.trim().length === 0 || isSubmitting ? styles.buttonDisabled : null]}
|
||||||
disabled={feedbackTitle.trim().length === 0 || isSubmitting}
|
disabled={feedbackTitle.trim().length === 0 || isSubmitting}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
|||||||
@ -59,6 +59,7 @@ export default function NoteDetailScreen() {
|
|||||||
/>
|
/>
|
||||||
<View style={styles.actionRow}>
|
<View style={styles.actionRow}>
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel="Cancel editing"
|
||||||
style={styles.secondaryButton}
|
style={styles.secondaryButton}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setIsEditing(false);
|
setIsEditing(false);
|
||||||
@ -69,6 +70,7 @@ export default function NoteDetailScreen() {
|
|||||||
<Text style={styles.secondaryButtonText}>Cancel</Text>
|
<Text style={styles.secondaryButtonText}>Cancel</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
<Pressable
|
<Pressable
|
||||||
|
accessibilityLabel="Save note changes"
|
||||||
style={styles.primaryButton}
|
style={styles.primaryButton}
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
await updateNote(noteId, draftTitle, draftBody);
|
await updateNote(noteId, draftTitle, draftBody);
|
||||||
@ -82,7 +84,7 @@ export default function NoteDetailScreen() {
|
|||||||
) : !isLoading ? (
|
) : !isLoading ? (
|
||||||
<>
|
<>
|
||||||
<Text style={styles.body}>{selectedNote?.body ?? 'No note body is available yet.'}</Text>
|
<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>
|
<Text style={styles.primaryButtonText}>Edit note</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user