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/.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 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 4313cda00e..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; } @@ -104,22 +104,22 @@ function createPanel(container: HTMLElement): HTMLElement { panel.innerHTML = `