Skip to content

Commit 5b60d66

Browse files
shivamhwpclaude
andcommitted
feat(web): screen reader window title puts the thread before the project
The setting now also reorders the title to status, thread, project, so a screen reader says the thread name before the project, as asked in #33339. Renamed to Screen reader window title to match. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b9e5de5 commit 5b60d66

6 files changed

Lines changed: 39 additions & 32 deletions

File tree

‎apps/web/src/appInit.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function readOpenThreadRef(router: AppRouter): ScopedThreadRef | null {
136136

137137
/**
138138
* Names the open thread and its project in the window title, or the app when none is open.
139-
* Screen readers read it on Alt+Tab, so it can also say what the thread is doing.
139+
* Screen readers read it on Alt+Tab, so it can lead with the thread and what it's doing.
140140
*/
141141
function startDocumentTitle(router: AppRouter): void {
142142
const readOnGuestPage = () => router.state.matches.some((match) => match.routeId === "/guest");
@@ -167,10 +167,11 @@ function startDocumentTitle(router: AppRouter): void {
167167
}),
168168
projectTitle: project?.title ?? null,
169169
threadTitle: thread?.title ?? null,
170-
threadStatus:
171-
thread !== null && getClientSettings().windowTitleThreadStatus
172-
? resolveWindowTitleThreadStatus(thread)
173-
: null,
170+
...(getClientSettings().screenReaderWindowTitle && {
171+
screenReader: {
172+
threadStatus: thread === null ? null : resolveWindowTitleThreadStatus(thread),
173+
},
174+
}),
174175
desktop: isElectron,
175176
});
176177
// Projects change whenever any project does; most changes leave the title alone.

‎apps/web/src/branding.logic.ts‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export function resolveWindowTitle(input: {
6060
readonly appDisplayName: string;
6161
readonly projectTitle: string | null;
6262
readonly threadTitle: string | null;
63-
readonly threadStatus?: string | null;
63+
/** The screen reader title: status, then thread, then project, since a screen reader reads from the start. */
64+
readonly screenReader?: { readonly threadStatus: string | null };
6465
readonly desktop: boolean;
6566
}): string {
6667
const threadTitle = input.threadTitle?.trim() ?? "";
@@ -69,8 +70,13 @@ export function resolveWindowTitle(input: {
6970
}
7071

7172
const projectTitle = input.projectTitle?.trim() ?? "";
72-
const names = projectTitle === "" ? threadTitle : `${projectTitle} / ${threadTitle}`;
73-
// Status leads so a screen reader says it first on Alt+Tab.
74-
const context = input.threadStatus ? `${input.threadStatus}: ${names}` : names;
75-
return input.desktop ? context : `${context} - ${input.appDisplayName}`;
73+
const status = input.screenReader?.threadStatus;
74+
const context =
75+
projectTitle === ""
76+
? threadTitle
77+
: input.screenReader
78+
? `${threadTitle} - ${projectTitle}`
79+
: `${projectTitle} / ${threadTitle}`;
80+
const title = status ? `${status}: ${context}` : context;
81+
return input.desktop ? title : `${title} - ${input.appDisplayName}`;
7682
}

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ export function useSettingsRestore(onRestored?: () => void) {
541541
...(settings.screenReaderAnnouncements !== DEFAULT_UNIFIED_SETTINGS.screenReaderAnnouncements
542542
? ["Screen reader announcements"]
543543
: []),
544-
...(settings.windowTitleThreadStatus !== DEFAULT_UNIFIED_SETTINGS.windowTitleThreadStatus
545-
? ["Thread status in window title"]
544+
...(settings.screenReaderWindowTitle !== DEFAULT_UNIFIED_SETTINGS.screenReaderWindowTitle
545+
? ["Screen reader window title"]
546546
: []),
547547
...(settings.responseStreamingMode !== DEFAULT_UNIFIED_SETTINGS.responseStreamingMode
548548
? ["Response streaming"]
@@ -661,7 +661,7 @@ export function useSettingsRestore(onRestored?: () => void) {
661661
followUpBehavior: DEFAULT_UNIFIED_SETTINGS.followUpBehavior,
662662
toolCallVisibility: DEFAULT_UNIFIED_SETTINGS.toolCallVisibility,
663663
screenReaderAnnouncements: DEFAULT_UNIFIED_SETTINGS.screenReaderAnnouncements,
664-
windowTitleThreadStatus: DEFAULT_UNIFIED_SETTINGS.windowTitleThreadStatus,
664+
screenReaderWindowTitle: DEFAULT_UNIFIED_SETTINGS.screenReaderWindowTitle,
665665
environmentIdentificationMode: DEFAULT_UNIFIED_SETTINGS.environmentIdentificationMode,
666666
glassOpacity: DEFAULT_UNIFIED_SETTINGS.glassOpacity,
667667
panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,
@@ -1297,7 +1297,7 @@ export function ChatSettingsPanel() {
12971297

12981298
<SettingsSection id="screen-reader" title="Screen reader">
12991299
<ScreenReaderAnnouncementsRow />
1300-
<WindowTitleThreadStatusRow />
1300+
<ScreenReaderWindowTitleRow />
13011301
</SettingsSection>
13021302
</SettingsPageContainer>
13031303
);
@@ -1411,30 +1411,30 @@ function ScreenReaderAnnouncementsRow() {
14111411
);
14121412
}
14131413

1414-
function WindowTitleThreadStatusRow() {
1414+
function ScreenReaderWindowTitleRow() {
14151415
const settings = useScopedSettings();
14161416
const updateSettings = useUpdateScopedSettings();
14171417
return (
14181418
<SettingsRow
1419-
{...searchableSetting("window-title-thread-status")}
1420-
description="Start the window title with Working, Needs approval, or Needs your input, which screen readers read first when you switch apps. Taskbars, shared screens, and time trackers see it too."
1419+
{...searchableSetting("screen-reader-window-title")}
1420+
description="Start the window title with the thread's status, like Needs approval, and its name, so screen readers read them first when you switch apps. Taskbars, shared screens, and time trackers see it too."
14211421
resetAction={
1422-
settings.windowTitleThreadStatus !== DEFAULT_UNIFIED_SETTINGS.windowTitleThreadStatus ? (
1422+
settings.screenReaderWindowTitle !== DEFAULT_UNIFIED_SETTINGS.screenReaderWindowTitle ? (
14231423
<SettingResetButton
1424-
label="thread status in window title"
1424+
label="screen reader window title"
14251425
onClick={() =>
14261426
updateSettings({
1427-
windowTitleThreadStatus: DEFAULT_UNIFIED_SETTINGS.windowTitleThreadStatus,
1427+
screenReaderWindowTitle: DEFAULT_UNIFIED_SETTINGS.screenReaderWindowTitle,
14281428
})
14291429
}
14301430
/>
14311431
) : null
14321432
}
14331433
control={
14341434
<Switch
1435-
checked={settings.windowTitleThreadStatus}
1436-
onCheckedChange={(checked) => updateSettings({ windowTitleThreadStatus: checked })}
1437-
aria-label="Thread status in window title"
1435+
checked={settings.screenReaderWindowTitle}
1436+
onCheckedChange={(checked) => updateSettings({ screenReaderWindowTitle: checked })}
1437+
aria-label="Screen reader window title"
14381438
/>
14391439
}
14401440
/>

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,11 @@ export const SETTINGS_SEARCH_ITEMS = [
493493
],
494494
},
495495
{
496-
id: "window-title-thread-status",
497-
title: "Thread status in window title",
496+
id: "screen-reader-window-title",
497+
title: "Screen reader window title",
498498
to: "/settings/chat",
499499
searchTerms: [
500-
"accessibility a11y screen reader nvda jaws voiceover orca narrator window title tab title alt tab taskbar working approval",
500+
"accessibility a11y screen reader nvda jaws voiceover orca narrator window title tab title alt tab taskbar thread status order working approval",
501501
],
502502
},
503503
{

‎docs/user/activity-log.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ are spaced out, so a quick step can be skipped for a newer one.
4242
The agent's reasoning text is never read. The setting follows the agent's real activity, whatever
4343
**Tool calls in chat** hides, and applies to this browser or device only.
4444

45-
To hear what the open thread is doing when you switch to T3 Code, turn on **Thread status in
46-
window title** in the same section. The window title then starts with **Working**, **Needs
47-
approval**, or **Needs your input**, so a screen reader says it first, and goes back to just the
48-
project and thread name when the turn ends.
45+
To hear the open thread and what it's doing when you switch to T3 Code, turn on **Screen reader
46+
window title** in the same section. The window title then starts with the thread's status
47+
(**Working**, **Needs approval**, or **Needs your input**) and its name, then the project, so a
48+
screen reader says them first. When the turn ends, only the status goes away.
4949
Anyone who can see your taskbar, window switcher, or shared screen sees it too, and time trackers
5050
that group by window title count each status separately.

‎packages/contracts/src/settings.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export const ClientSettingsSchema = Schema.Struct({
530530
screenReaderAnnouncements: ScreenReaderAnnouncements.pipe(
531531
Schema.withDecodingDefault(Effect.succeed("status" as const)),
532532
),
533-
windowTitleThreadStatus: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
533+
screenReaderWindowTitle: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
534534
// Retired Labs toggle. Still read as the default for the Usage item in threadDetailsItems.
535535
threadDetailsUsageEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
536536
// Sparse show/hide overrides for thread details card items. Missing ids use the client's
@@ -2055,7 +2055,7 @@ export const ClientSettingsPatch = Schema.Struct({
20552055
boringSidebarMultilineRows: Schema.optionalKey(Schema.Boolean),
20562056
toolCallVisibility: Schema.optionalKey(ToolCallVisibility),
20572057
screenReaderAnnouncements: Schema.optionalKey(ScreenReaderAnnouncements),
2058-
windowTitleThreadStatus: Schema.optionalKey(Schema.Boolean),
2058+
screenReaderWindowTitle: Schema.optionalKey(Schema.Boolean),
20592059
threadDetailsUsageEnabled: Schema.optionalKey(Schema.Boolean),
20602060
threadDetailsItems: Schema.optionalKey(Schema.Record(Schema.String, Schema.Boolean)),
20612061
sidebarWorkingShelfEnabled: Schema.optionalKey(Schema.Boolean),

0 commit comments

Comments
 (0)