@devries-cameron20 / t3code-1 / commits / 12d4c62214
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): every settings nav group has a name for screen readers (#35101)

Julius Marminge committed Nov 12, 2026 at 02:41 UTC 12d4c62214ced1f7cc71096f83c81cad1cf39923
3 files changed +25 -20
apps/web/src/components/settings/SettingsSidebarNav.composition.browser.test.tsx
+7
@@ -102,5 +102,12 @@ it.each([1280, 390])("names each group by a heading outside it at %ipx wide", as
102 false,
103 );
104 }
105 + const groups = page.getByRole("group").elements();
106 + expect(groups).toHaveLength(SETTINGS_NAV_GROUPS.length);
107 + for (const group of groups) {
108 + const first = group.querySelector("[data-settings-section]")?.textContent;
109 + const heading = document.getElementById(group.getAttribute("aria-labelledby") ?? "");
110 + expect(heading?.tagName, `the group starting at ${first} has no heading`).toBe("H3");
111 + }
112 expect(page.getByRole("tree").query()).toBeNull();
113 });
apps/web/src/components/settings/SettingsSidebarNav.tsx
+11 -16
@@ -380,25 +380,20 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
380 <div onKeyDown={handleSettingsSectionKeyDown} className="flex flex-col gap-4">
381 {SETTINGS_NAV_GROUPS.map((group, index) => (
382 <div
383 - key={group.heading ?? index}
383 + key={group.heading}
384 className="flex flex-col gap-1 max-md:border-t max-md:border-sidebar-border max-md:pt-4 max-md:first:border-t-0 max-md:first:pt-0"
385 >
386 - {group.heading ? (
387 - <h3
388 - id={`settings-nav-group-${index}`}
389 - className={cn(
390 - "px-2 text-xs font-medium text-sidebar-muted-foreground/80",
391 - !compactSearchOpen && "max-md:sr-only",
392 - )}
393 - >
394 - {m(group.heading)}
395 - </h3>
396 - ) : null}
397 - {/* The heading stays outside the group it names so NVDA does not read the name twice. */}
398 - <div
399 - role="group"
400 - aria-labelledby={group.heading ? `settings-nav-group-${index}` : undefined}
386 + <h3
387 + id={`settings-nav-group-${index}`}
388 + className={cn(
389 + "px-2 text-xs font-medium text-sidebar-muted-foreground/80",
390 + group.headingHidden ? "sr-only" : !compactSearchOpen && "max-md:sr-only",
391 + )}
392 >
393 + {m(group.heading)}
394 + </h3>
395 + {/* The heading stays outside the group it names so NVDA does not read the name twice. */}
396 + <div role="group" aria-labelledby={`settings-nav-group-${index}`}>
397 <SidebarMenu>
398 {group.paths.map((to) => {
399 const Icon = SETTINGS_SECTION_ICONS[to];
apps/web/src/components/settings/settingsSearch.ts
+7 -4
@@ -118,13 +118,15 @@ export const SETTINGS_SECTION_LABELS: Readonly<Record<SettingsPath, string>> = {
118 "/settings/archived": msg("Archive"),
119 };
120
121 -/** Sidebar order. A group without a heading is set apart by space alone. */
121 +/** Sidebar order. A group with a hidden heading is set apart on screen by space alone. */
122 export const SETTINGS_NAV_GROUPS: ReadonlyArray<{
123 - readonly heading: string | null;
123 + readonly heading: string;
124 + readonly headingHidden?: true;
125 readonly paths: ReadonlyArray<SettingsPath>;
126 }> = [
127 {
127 - heading: null,
128 + heading: msg("Preferences"),
129 + headingHidden: true,
130 paths: [
131 "/settings/general",
132 "/settings/appearance",
@@ -158,7 +160,8 @@ export const SETTINGS_NAV_GROUPS: ReadonlyArray<{
160 ],
161 },
162 {
161 - heading: null,
163 + heading: msg("More"),
164 + headingHidden: true,
165 paths: ["/settings/maintenance", "/settings/labs", "/settings/about", "/settings/archived"],
166 },
167 ];