Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(a11y): announce agent activity to screen readers #13430

ClosedLeos-Khai(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/13430/headopened View on GitHub

Showing 10 changed files with 117 additions and 1 deletion (loading 7).

x
0 of 10 viewed, 10 left
8 additions and 0 deletionsapps/mobile/src/components/ErrorBanner.tsxModified
View file
@@ -1,7 +1,15 @@
+import { useEffect } from "react";
import { View } from "react-native";
​
+import { announce } from "../lib/accessibilityAnnouncement";
import { AppText as Text } from "./AppText";
export function ErrorBanner(props: { readonly message: string }) {
+ // Callers mount the banner when an error appears, so a screen reader user
+ // hears it without hunting for it. Keyed on the text so re-renders stay quiet.
+ useEffect(() => {
+ announce(`Error: ${props.message}`);
+ }, [props.message]);
+​
return (
<View className="rounded-2xl border border-danger-border bg-danger px-3.5 py-3">
<Text className="font-t3-medium text-sm text-danger-foreground">{props.message}</Text>
70 additions and 1 deletionapps/mobile/src/features/threads/ThreadDetailScreen.tsxModified
View file
@@ -1,5 +1,6 @@
import type { WorktreeSetupCardProps } from "./worktree-setup-card";
import type { ComposerTextPaste } from "../../native/T3ComposerEditor.types";
+import { activityAnnouncementTurnFields } from "@t3tools/client-runtime/activity-announcement";
import { type EnvironmentConnectionPhase } from "@t3tools/client-runtime/connection";
import {
appendCodexArtifactTemplateUsePrompt,
@@ -13,7 +14,7 @@
import { resolveProviderSkillsForCwd } from "@t3tools/client-runtime/providerSkills";
import type { LegendListRef } from "@legendapp/list/react-native";
import { HeaderHeightContext } from "@react-navigation/elements";