The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 17:15 UTC
fix(web): new project publish option tells screen readers whether it is on (#36090)
Julius Marminge committed
Nov 13, 2026 at 01:11 UTC
74573fc29b901bafbf8f1dbb2eb29606da1fa448
4 files changed
+44
-3
apps/web/src/components/CommandPalette.composition.browser.test.tsx
+38
-3
@@ -8,9 +8,32 @@ import { CommandPalette } from "./CommandPalette";
8
import { openCommandPalette } from "../commandPaletteBus";
9
import { primaryServerKeybindingsAtom } from "../state/server";
10
11
-const scopes = vi.hoisted(() => ({ denied: undefined as string | undefined }));
12
-const setup = (deniedScope?: string) => {
11
+const scopes = vi.hoisted(() => ({
12
+ denied: undefined as string | undefined,
13
+ sourceControl: undefined as unknown,
14
+}));
15
+const setup = (deniedScope?: string, sourceControl?: unknown) => {
16
scopes.denied = deniedScope;
17
+ scopes.sourceControl = sourceControl;
18
+};
19
+const githubAvailable = {
20
+ versionControlSystems: [],
21
+ sourceControlProviders: [
22
+ {
23
+ kind: "github",
24
+ label: "GitHub",
25
+ status: "available",
26
+ version: { _tag: "None" },
27
+ installHint: "Install GitHub CLI",
28
+ detail: { _tag: "None" },
29
+ auth: {
30
+ status: "authenticated",
31
+ account: { _tag: "Some", value: "demo" },
32
+ host: { _tag: "None" },
33
+ detail: { _tag: "None" },
34
+ },
35
+ },
36
+ ],
37
};
38
39
vi.mock("@effect/atom-react", async (original) => ({
@@ -101,7 +124,7 @@ vi.mock("../state/filesystem", async (original) => ({
124
}));
125
vi.mock("../state/query", async (original) => ({
126
...(await original<typeof import("../state/query")>()),
104
- useEnvironmentQuery: () => ({ data: undefined, isLoading: false }),
127
+ useEnvironmentQuery: () => ({ data: scopes.sourceControl, isLoading: false }),
128
}));
129
vi.mock("./settings/useAvailableSettingsSearchItems", () => ({
130
useAvailableSettingsSearchItems: () => [],
@@ -208,3 +231,15 @@ it.each([
231
await userEvent.keyboard("{Tab}");
232
await expect.element(submit).toHaveFocus();
233
});
234
+
235
+it("tells screen readers whether a new project will be published", async () => {
236
+ setup(undefined, githubAvailable);
237
+ await using _screen = await render(<CommandPalette>{null}</CommandPalette>);
238
+ await act(() => openCommandPalette({ open: "add-project" }));
239
+ await page.getByText("New project", { exact: true }).click();
240
+ await page.getByRole("combobox").fill("demo-project");
241
+ const option = page.getByRole("option", { name: /Create private repository/ });
242
+ await expect.element(option).toHaveAttribute("aria-checked", "false");
243
+ await option.click();
244
+ await expect.element(option).toHaveAttribute("aria-checked", "true");
245
+});
apps/web/src/components/CommandPalette.logic.ts
+2
@@ -213,6 +213,8 @@ export interface CommandPaletteActionItem extends CommandPaletteItem {
213
readonly run: () => Promise<void>;
214
/** A pin toggle on the row, also reached with the pin shortcut while the row is highlighted. */
215
readonly pin?: CommandPaletteItemPin;
216
+ /** Set on toggle rows; exposed to assistive technology as `aria-checked`. */
217
+ readonly checked?: boolean;
218
}
219
220
export interface CommandPaletteItemPin {
apps/web/src/components/CommandPalette.tsx
+1
@@ -2427,6 +2427,7 @@ function OpenCommandPaletteDialog(props: {
2427
),
2428
...(isCreatingNewProject ? { disabled: true } : {}),
2429
keepOpen: true,
2430
+ checked: newProjectPublishes,
2431
run: async () => {
2432
setNewProjectPublishes((publishes) => !publishes);
2433
},
apps/web/src/components/CommandPaletteResults.tsx
+3
@@ -250,6 +250,9 @@ function CommandPaletteResultRow(props: {
250
{...(props.index === undefined ? {} : { index: props.index })}
251
value={props.item.value}
252
active={props.isActive}
253
+ {...(props.item.kind === "action" && props.item.checked !== undefined
254
+ ? { "aria-checked": props.item.checked }
255
+ : {})}
256
onPointerDown={(event) => {
257
if (props.item.threadRef) {
258
startPaletteThreadDrag(