Skip to content

fix(console): expose the problems as a tree of files and problems - #382

Open
Exeloo wants to merge 9 commits into
mainfrom
fix/plugins-a11y
Open

Exeloo wants to merge 9 commits into
mainfrom
fix/plugins-a11y

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Closes #324

Problems panel (plugins/console/src/widgets/problems/ProblemsView.svelte): each file was a list item holding its fold button and its problem buttons, so the list announced the files only and the problems were not items (WCAG 1.3.1). The panel is now a flat tree that matches its arrow keys (Left and Right fold): a file is a level 1 treeitem with aria-expanded, its problems are level 2 treeitems, and the empty state sits outside the tree. Rows carry no aria-selected (nothing is selected there; a screen reader would say "selected" on every move).

div[role=tree "Problems"]
  button[role=treeitem aria-level=1 aria-expanded]  file
  button[role=treeitem aria-level=2]                problem…
(empty: EmptyState, outside the tree)

The other four items of #324 (code tab close button out of the tab order, Game screen resolution button name, Packages details region, History current step time color) were already fixed by #329, which did not close the issue. This PR adds an e2e assertion for each.

How do you test this PR?

  • Before (the four fix(editor): polish panel tips, focus, contrast and docs before testing #329 fixes reverse-applied, old Problems view): 7 e2e failures, each for the expected reason: close button tabindex "" instead of "-1"; no level 2 treeitem in a Problems tree (×3, console and ecs); history time rgb(155, 160, 172) instead of the row's rgb(238, 242, 255); no "Package details" region; no "Resolution: Fit" button.
  • After: the code-editor, viewport, marketplace, history-panel, console and ecs specs: 35/35 passed, 0 skipped (with the engine and the CLI, example plugin built).
  • Round 1 (e543bd4: no aria-selected, a Space test that folds a file, a stale ecs locator fixed; two comments wrapped): ecs, console and code-editor specs 25 passed, pnpm lint passes.
  • 5ba3025 fixes a flaky lookup the integration run found in console.spec.ts "a build error is listed with its file and position": a build problem without a file could come first in the tree, so .first() failed 2 times in 5. With the fix, --repeat-each=5: 5 passed.
Command Result
pnpm turbo build --filter=@nanoforge-dev/editor... pass
plugins/console: pnpm test:unit, pnpm typecheck 15 passed; 0 errors
apps/editor: pnpm typecheck 0 errors
pnpm lint pass

Not done: a screen reader pass and an axe run (axe is not installed; see #359).

Integration: a scratch branch with every editor branch of this sweep merged passed pnpm build, lint, typecheck, pnpm test --force (1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).

Merge danger

Follow-up issues

Quality gate

Lane Result HEAD covered
Docs N/A: behaviour unchanged, the docs pages still hold 5b60012
Correctness I1 (a stale ecs locator) found; fixed in e543bd4, producer-verified, not re-reviewed 5b60012
Performance Not recorded as a lane (the all-lanes reviewer raised no finding) 5b60012
Accessibility Pass (M1 aria-selected dropped and M3 comment added in e543bd4; M2 role="treeitem" on a <button> kept, a best-practice rule, not a WCAG failure) 5b60012
Security Not recorded as a lane (the all-lanes reviewer raised no finding) 5b60012
Style Pass (2 comments over 100 columns, wrapped in 9504627 and 437a3da) 5b60012

Last rounds e543bd4, 9504627, 437a3da (round 1) and 5ba3025 (flaky locator): producer and integration runs, not re-reviewed.

Each file of the Problems panel was a section listitem holding its
expand button and its problem buttons: the list announced the files
only, and the problems were no items (WCAG 1.3.1). The panel is now a
flat tree: a file is a level 1 treeitem with aria-expanded, its
problems level 2 treeitems, which matches its arrow keys (Left and
Right fold). The empty state sits outside the tree.

Closes #324
Nothing is selected in Problems: the attribute made screen readers
say "selected" on the roving row. ARIA 1.2 does not require it on a
treeitem, so Svelte's older rule is ignored, with its reason. The ecs
layout warning test looks for treeitems after the fix too, and Space
folds a file.
…problems tree

A build problem without a file can come first, so .first() made the test flaky (2 of 5).
@Exeloo
Exeloo requested a review from Tchips46 as a code owner November 29, 2026 11:16
@github-actions github-actions Bot added apps:editor Related to Editor app plugins:console Related to Console plugin labels Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps:editor Related to Editor app plugins:console Related to Console plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Small accessibility issues in the code tabs, Game screen, Packages, Problems and History

1 participant