From 5c0bfc223e78e9a2f02a457a4b63ae98fbd34034 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:12:05 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20ARIA=20labe?= =?UTF-8?q?ls=20and=20live=20regions=20to=20search=20panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .Jules/palette.md | 3 +++ pkgs/id/web/src/search-panel.ts | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000000..9a2fa7406e --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2023-10-11 - Search Panel Accessibility +**Learning:** Dynamic UI components like search panels often update text content (like "1 of 5 matches") without focus shifting. Screen readers miss these updates unless `aria-live="polite"` and `aria-atomic="true"` are used on the indicator element. Additionally, icon-only buttons (`▲`, `▼`, `×`) often lack accessible names, requiring `aria-label` since `title` alone isn't always reliable across all assistive tech. +**Action:** Always verify that dynamic status text has appropriate `aria-live` regions and that all icon-only buttons include an `aria-label` attribute in addition to a `title` tooltip. diff --git a/pkgs/id/web/src/search-panel.ts b/pkgs/id/web/src/search-panel.ts index 4313cda00e..f795c00508 100644 --- a/pkgs/id/web/src/search-panel.ts +++ b/pkgs/id/web/src/search-panel.ts @@ -104,22 +104,22 @@ function createPanel(container: HTMLElement): HTMLElement { panel.innerHTML = `
- - - - + + + + - +
`; From 74f270c134c9eb9908423bd0a3b4526f1711114b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:14:10 +0000 Subject: [PATCH 2/3] Fix CI: Update pozil/auto-assign-issue to v4 Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .github/workflows/auto-assign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index e4ea36738e..1d0573c1bf 100755 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write steps: - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v1 + uses: pozil/auto-assign-issue@v4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} assignees: dezren39 From f2ce34c50a3dcbb7ca6199d15a20cbcb28d12980 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:23:10 +0000 Subject: [PATCH 3/3] Fix CI: resolve biome lint issues in pkgs/id/web/src Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- pkgs/id/web/src/cursor-utils.test.ts | 20 +++---- pkgs/id/web/src/editor.ts | 4 +- pkgs/id/web/src/image-node-view.ts | 1 - pkgs/id/web/src/search-panel.ts | 4 +- pkgs/id/web/src/world.ts | 79 +++++++++++++++++----------- 5 files changed, 62 insertions(+), 46 deletions(-) diff --git a/pkgs/id/web/src/cursor-utils.test.ts b/pkgs/id/web/src/cursor-utils.test.ts index 4ec48dbb83..2214e3fe43 100644 --- a/pkgs/id/web/src/cursor-utils.test.ts +++ b/pkgs/id/web/src/cursor-utils.test.ts @@ -3,21 +3,21 @@ * These test the pure functions used in collaborative cursor management. */ -import { describe, it, expect } from "vitest"; +import { describe, expect, it } from "vitest"; import { - FADE_START_MS, + CURSOR_COLORS, + type CursorForMerge, + clusterOverlappingGroups, + doGroupsOverlap, + estimateTooltipWidth, FADE_END_MS, - HIDE_MS, + FADE_START_MS, + getColorForClient, getOpacityForAge, getStrobeDurationMs, - isLightColor, - getColorForClient, - CURSOR_COLORS, - estimateTooltipWidth, groupCursorsByPosition, - doGroupsOverlap, - clusterOverlappingGroups, - type CursorForMerge, + HIDE_MS, + isLightColor, type PositionGroup, } from "./cursor-utils"; diff --git a/pkgs/id/web/src/editor.ts b/pkgs/id/web/src/editor.ts index 715d114472..106331fc37 100644 --- a/pkgs/id/web/src/editor.ts +++ b/pkgs/id/web/src/editor.ts @@ -15,7 +15,7 @@ import { buildMenuItems, exampleSetup } from "prosemirror-example-setup"; import { gapCursor } from "prosemirror-gapcursor"; import { history } from "prosemirror-history"; import { keymap } from "prosemirror-keymap"; -import { MenuItem, blockTypeItem, liftItem, redoItem, selectParentNodeItem, undoItem } from "prosemirror-menu"; +import { blockTypeItem, liftItem, MenuItem, redoItem, selectParentNodeItem, undoItem } from "prosemirror-menu"; import { type MarkType, Node, Schema } from "prosemirror-model"; import { schema as basicSchema } from "prosemirror-schema-basic"; import { addListNodes } from "prosemirror-schema-list"; @@ -372,7 +372,7 @@ export function initEditor( const browseImages = new MenuItem({ title: "Browse uploaded images", label: "🖼", - run(state, _dispatch, edView) { + run(_state, _dispatch, edView) { openImageBrowser(edView, editorSchema); }, }); diff --git a/pkgs/id/web/src/image-node-view.ts b/pkgs/id/web/src/image-node-view.ts index 3460063c37..889795a187 100644 --- a/pkgs/id/web/src/image-node-view.ts +++ b/pkgs/id/web/src/image-node-view.ts @@ -26,7 +26,6 @@ export class ImageNodeView implements NodeView { // Resize state private resizing = false; private startX = 0; - private startY = 0; private startWidth = 0; private startHeight = 0; private aspectRatio = 1; diff --git a/pkgs/id/web/src/search-panel.ts b/pkgs/id/web/src/search-panel.ts index f795c00508..1a8e43b184 100644 --- a/pkgs/id/web/src/search-panel.ts +++ b/pkgs/id/web/src/search-panel.ts @@ -52,7 +52,7 @@ const panelState: PanelState = { /** Count total matches for display. */ function countMatches(view: EditorView): number { const ss = getSearchState(view.state); - if (!ss || !ss.query.valid) return 0; + if (!ss?.query.valid) return 0; let count = 0; let result = ss.query.findNext(view.state, 0); @@ -69,7 +69,7 @@ function countMatches(view: EditorView): number { function updateMatchCount(view: EditorView): void { if (!panelState.matchCountEl) return; const ss = getSearchState(view.state); - if (!ss || !ss.query.valid || !ss.query.search) { + if (!ss?.query.valid || !ss.query.search) { panelState.matchCountEl.textContent = ""; return; } diff --git a/pkgs/id/web/src/world.ts b/pkgs/id/web/src/world.ts index 8314b54c3a..ad0bfba3ea 100644 --- a/pkgs/id/web/src/world.ts +++ b/pkgs/id/web/src/world.ts @@ -1,15 +1,7 @@ /** Browser presentation for the server-authoritative world session. */ type WorldFrame = { - type: - | "snapshot" - | "event" - | "view" - | "records" - | "invite" - | "upload_ready" - | "module_installed" - | "error"; + type: "snapshot" | "event" | "view" | "records" | "invite" | "upload_ready" | "module_installed" | "error"; snapshot?: { world_id: string; current_sequence: number; @@ -72,10 +64,29 @@ function initWorld(): void { const copyButton = element(root, "[data-world-copy]"); const inviteOutput = element(root, "[data-world-invite-output]"); if ( - !name || !admin || !capability || !worldInput || !inviteButton || !moduleInput || !moduleSeed || !installButton || !joinButton || !chatForm || !chatInput || - !inputForm || !gameInput || !log || !view || !recordsView || !recordsRefresh || !participants || - !status || !copyButton || !inviteOutput - ) return; + !name || + !admin || + !capability || + !worldInput || + !inviteButton || + !moduleInput || + !moduleSeed || + !installButton || + !joinButton || + !chatForm || + !chatInput || + !inputForm || + !gameInput || + !log || + !view || + !recordsView || + !recordsRefresh || + !participants || + !status || + !copyButton || + !inviteOutput + ) + return; // `/world?world=arena` opens the page on that world. worldInput.value = new URLSearchParams(window.location.search).get("world") ?? ""; @@ -152,11 +163,13 @@ function initWorld(): void { recordsPending = false; recordsView.textContent = JSON.stringify(records, null, 2); } else { - socket?.send(JSON.stringify({ - type: "records", - capability: capability.value.trim(), - after: recordsAfter, - })); + socket?.send( + JSON.stringify({ + type: "records", + capability: capability.value.trim(), + after: recordsAfter, + }), + ); } break; } @@ -185,10 +198,12 @@ function initWorld(): void { recordsAfter = null; recordsPending = true; // This session is joined, so it can also ask for records. - socket.send(JSON.stringify({ - type: "records", - capability: capability.value.trim(), - })); + socket.send( + JSON.stringify({ + type: "records", + capability: capability.value.trim(), + }), + ); }; recordsRefresh.addEventListener("click", requestRecords); @@ -276,15 +291,17 @@ function initWorld(): void { const upload = new WebSocket(`${scheme}//${location.host}/ws/world`); let uploadStarted = false; upload.addEventListener("open", () => { - upload.send(JSON.stringify({ - type: "install_begin", - admin_token: secret, - total_bytes: file.size, - // The host computes the canonical Iroh BLAKE3 hash and returns it. - module_hash: null, - seed, - world: selectedWorld(), - })); + upload.send( + JSON.stringify({ + type: "install_begin", + admin_token: secret, + total_bytes: file.size, + // The host computes the canonical Iroh BLAKE3 hash and returns it. + module_hash: null, + seed, + world: selectedWorld(), + }), + ); }); upload.addEventListener("message", async (message) => { let frame: WorldFrame;