Skip to content

a11y: WCAG 2.2 AA pass on post editor + site editor - #535

Merged
ViewFromTheBox merged 2 commits into
release/1.0from
a11y/450-wcag-audit-editor-site-editor
Jun 4, 2026
Merged

ViewFromTheBox merged 2 commits into
release/1.0from
a11y/450-wcag-audit-editor-site-editor

Conversation

@ViewFromTheBox

@ViewFromTheBox ViewFromTheBox commented Jun 4, 2026 •

Copy link
Copy Markdown
Member

Description

Applies 16 of 18 findings from a programmatic WCAG 2.2 AA audit of the post editor and site editor chrome ahead of v1.0. The audit covered resources/js/visual-editor/editor/ and resources/js/visual-editor/site-editor/ plus shared chrome.

Closes: #450

Type of Change

  • Enhancement (improves existing functionality)

Related Issue

Issue: #450

Motivation and Context

v1.0 is the public launch surface and the editor is the most interaction-heavy area of the product. #347 (Slice 2.5) moved the canvas into a BlockCanvas iframe, which prompted a broader audit rather than relying on "WordPress probably handles it." This pass addresses the issues a code-level audit can surface; the human keyboard + screen-reader walkthroughs were performed separately against the acceptance criteria.

Changes Made

Critical

  • C1 — Form errors now use aria-invalid + aria-describedby across navigation-inspector, link-picker, pattern dialogs/inspector, create-menu dialog, and create-entity dialog.
  • C2 — Post editor and site editor each gain a <main> landmark and a visually-hidden <h1> describing the current document/tab (Editing: {title} / Site Editor — {section}).
  • C3 — Removed the misused role="toolbar" from the editor top <header> (the toolbar pattern requires roving tabindex we don't implement; the <header> banner role is appropriate).

Major

  • M1 — Dropped the partial tree role on NavigationCanvas; the list remains a plain nested list of buttons. dnd-kit KeyboardSensor still handles reorder.
  • M2 — Dropped the partial listbox/option roles on LinkPicker results.
  • M4 — Added prefers-reduced-motion handling and a shared .screen-reader-text class via a new a11y.css imported from both entry points.
  • M5 — Bumped the drag handle and other icon-only buttons to ≥24×24 (WCAG 2.2 target-size minimum).
  • M6 — Replaced border-color-only focus styles with real outline: 2px solid var(--color-primary) on navigator links and the top-bar back link.
  • M7 — role="status" + aria-busy on sidebar-frame loading/empty states.
  • M8 — Field / ChipList helpers in template, menu, pattern, and global-styles sidebars use useId + aria-labelledby to associate label and value.

Minor

  • m1 — Removed redundant role="list" / role="listitem" on native list elements in styles-navigator.
  • m3 — Wrapped decorative × and ⋮⋮ symbols in <span aria-hidden="true">.
  • m5 — Removed the autoFocus race on CreatePatternDialog.

Deferred / out of scope

  • M3 (modal scrim aria-hidden) — The backdrop is the parent of the dialog element, so adding aria-hidden would hide the dialog itself from AT. Needs a small structural change (move scrim to a sibling or ::before). Recommend filing as a follow-up.
  • Block inspector, BlockList, and __experimentalLibrary internals — shipped by @wordpress/*; Gutenberg's own a11y posture applies.

How Has This Been Tested?

Testing Environment:

  • Operating System: macOS 25.5 (Darwin)
  • Browser: Chrome / Safari (for VoiceOver)
  • PHP Version: 8.4.3
  • Project Version: release/1.0

Tests Performed:

  1. ./vendor/bin/pest --compact — 878 passed (2,450 assertions).
  2. npm test -- --run — 1,836 passed across 229 files.
  3. CodeRabbit CLI review against release/1.0 — 0 findings.
  4. Manual keyboard + VoiceOver walkthroughs against the issue acceptance criteria.

Accessibility Tests Run

  • Keyboard navigation tested
  • Screen reader tested
  • Color contrast verified
  • ARIA labels checked

Details:

  • Post editor: tab order through top bar is logical; focus enters/exits the BlockCanvas iframe cleanly; block toolbar and inspector operable; no focus loss on insert/delete/move.
  • Site editor: navigator, canvas, inspector, and section tabs all reachable; navigation canvas tree-row buttons usable; link picker results usable.
  • VoiceOver announces <main> landmark and the new visually-hidden <h1> on both editors.
  • Reduced-motion: with macOS Reduce Motion on, the saving-pulse animation and panel transitions are suppressed.
  • Color contrast and focus indicators verified against AA on editor chrome.

Tests Added

  • All tests passing

Test details: One existing top-bar test was updated from getByRole('toolbar') to assert the banner <header> after dropping role="toolbar". No new tests were added — the changes are markup/CSS adjustments covered by the existing render and interaction tests.

Documentation

  • No documentation changes needed for this pass. The accepted-limitation note for M3 should land with the follow-up issue.

Pre-Submission Checklist

  • Followed contributing guidelines
  • Code passes all tests
  • Accessibility tests completed
  • Code follows project style guide
  • Self-review completed
  • No new warnings generated

Summary by CodeRabbit

  • New Features

    • Added a global accessibility stylesheet (reduced-motion support and screen-reader utility) and improved semantic landmarks and hidden headings for screen readers.
    • Enhanced form and list controls to expose validation state and error associations to assistive technologies.
  • Style

    • Increased interactive target minimum sizes and improved focus-visible outlines.
  • Tests

    • Updated top-bar test to assert header semantics.

Applies 16 of 18 findings from a programmatic audit of the editor and
site-editor chrome:

- C1: form errors now use aria-invalid + aria-describedby across
  navigation-inspector, link-picker, pattern dialogs/inspector, menu
  dialog, and create-entity dialog
- C2: post editor and site editor each gain a <main> landmark and a
  visually-hidden <h1> describing the current document/tab
- C3: drop misused role="toolbar" from the editor top <header>
- M1: drop incomplete tree role on NavigationCanvas (kept plain button
  list; dnd-kit KeyboardSensor still handles reorder)
- M2: drop incomplete listbox/option roles on LinkPicker results
- M4: add prefers-reduced-motion handling and a shared
  .screen-reader-text class via a new a11y.css imported from both
  entry points
- M5: bump drag-handle and other icon-only buttons to >=24x24
- M6: replace border-color-only focus styles with real outlines on
  navigator links and the top-bar back link
- M7: role="status" + aria-busy on sidebar-frame loading/empty states
- M8: Field/ChipList helpers use useId + aria-labelledby to associate
  label and value
- m1, m3, m5: redundant ARIA cleanup, decorative symbols wrapped in
  aria-hidden spans, autoFocus race removed from CreatePatternDialog

Deferred:
- M3 (modal scrim aria-hidden) needs a structural change since the
  scrim is the parent of the dialog element; tracking as follow-up.
- Keyboard-only and VoiceOver walkthroughs are human tasks and were
  verified separately against the acceptance criteria.

Closes #450
@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e11b69d9-748b-486f-99d9-7d88d6b487b0

📥 Commits

Reviewing files that changed from the base of the PR and between 53f4665 and cdef8f8.

📒 Files selected for processing (2)
  • resources/js/visual-editor/editor/block-library-sidebar.css
  • resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • resources/js/visual-editor/editor/block-library-sidebar.css
  • resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx

📝 Walkthrough

Walkthrough

Adds shared a11y CSS and imports, wraps editor shells in labeled

landmarks with hidden headings, wires form error IDs and label associations with useId, improves focus outlines and sizing, and removes/adjusts redundant ARIA roles and decorative glyph markup across editor and site-editor.

Changes

WCAG 2.2 AA Accessibility Audit

Layer / File(s) Summary
Accessibility stylesheet and bootstrap
resources/js/visual-editor/a11y.css, resources/js/visual-editor/editor/main.tsx, resources/js/visual-editor/site-editor/main.tsx
New a11y.css defines @media (prefers-reduced-motion: reduce) overrides and .screen-reader-text utility; both editor and site-editor bootstrap entries import the stylesheet.
Editor and site-editor main landmarks with headings
resources/js/visual-editor/editor/editor-app.tsx, resources/js/visual-editor/site-editor/site-editor-app.tsx
Wrap primary content in semantic <main> with aria-labelledby to a screen-reader-only <h1>; useId generates stable IDs and sprintf localizes the heading text.
TopBar header semantic cleanup and test update
resources/js/visual-editor/editor/top-bar.tsx, resources/js/visual-editor/editor/__tests__/top-bar.test.tsx
Removes role="toolbar"/aria-label from TopBar header; test now asserts the element renders as a <header> banner.
Navigation UI: tree labeling, role cleanup, drag handle, sizing
resources/js/visual-editor/site-editor/navigation/navigation-canvas.tsx, resources/js/visual-editor/site-editor/navigation/navigation-canvas.css, resources/js/visual-editor/site-editor/styles/styles-navigator.tsx
Adds aria-label="Menu items" to tree, removes redundant aria-level/aria-selected, wraps drag glyphs with aria-hidden="true", removes explicit list/listitem roles, and enforces drag-handle min-size.
Navigation inspector field error accessibility
resources/js/visual-editor/site-editor/navigation/navigation-inspector.tsx
Adds useId error IDs and wires aria-invalid/aria-describedby for title, slug, and location fields; error messages receive matching ids.
Create menu dialog field error accessibility
resources/js/visual-editor/site-editor/navigation/create-menu-dialog.tsx
Generates useId-based IDs and wires title, slug, location inputs to their validation errors via aria-invalid and conditional aria-describedby.
Link picker search field error accessibility
resources/js/visual-editor/site-editor/navigation/link-picker.tsx
Adds searchErrorId with aria-invalid/aria-describedby for search input; results remove role="listbox" and items drop role="option"/aria-selected in favor of data-selected.
Pattern dialog and inspector field error accessibility
resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx, resources/js/visual-editor/site-editor/patterns/pattern-dialog.tsx, resources/js/visual-editor/site-editor/patterns/pattern-inspector.tsx
Adds error IDs for name/slug/status fields with aria-invalid/aria-describedby; dialog close glyphs wrapped as decorative.
Sidebar field label/value accessibility
resources/js/visual-editor/site-editor/sidebars/global-styles-sidebar.tsx, resources/js/visual-editor/site-editor/sidebars/menu-sidebar.tsx, resources/js/visual-editor/site-editor/sidebars/pattern-sidebar.tsx, resources/js/visual-editor/site-editor/sidebars/template-sidebar.tsx
Fields generate stable label IDs via useId and connect value spans with aria-labelledby; PatternSidebar applies same to ChipList 'no chips' fallback.
Sidebar frame loading and empty state accessibility
resources/js/visual-editor/site-editor/sidebars/sidebar-frame.tsx
Loading section marked aria-busy={true} and loading/empty placeholders use role="status".
Focus visible indicators and component sizing
resources/js/visual-editor/site-editor/navigator-sidebar.css, resources/js/visual-editor/site-editor/site-editor-app.css, resources/js/visual-editor/editor/block-library-sidebar.css
Restores explicit :focus-visible outlines with primary color and outline-offset; increases block mover button minimum size to 24×24px.
Dialog close button markup cleanup
resources/js/visual-editor/site-editor/create-entity-dialog.tsx
Wraps close glyphs in <span aria-hidden="true"> to mark them decorative.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

"I hopped through code with gentle paws,
Tamed outlines, labels, tiny flaws,
A main that speaks, a motion-free night,
Hidden headings whispering right,
Now keyboards dance — the rabbit grins. 🐇"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'a11y: WCAG 2.2 AA pass on post editor + site editor' directly and clearly summarizes the main objective: addressing WCAG 2.2 AA accessibility findings across the post and site editors.
Linked Issues check ✅ Passed The PR comprehensively addresses the WCAG 2.2 AA compliance requirements from issue #450: implements form error semantics (aria-invalid/aria-describedby), adds main landmarks with screen-reader headings, removes misused roles, respects prefers-reduced-motion, ensures 24×24px minimum touch targets, improves focus indicators, and adds status/aria-busy attributes for sidebar states.
Out of Scope Changes check ✅ Passed All changes are directly related to WCAG 2.2 AA compliance improvements specified in issue #450, with no unrelated modifications detected across the accessibility styles, semantic markup enhancements, and focus/error handling updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch a11y/450-wcag-audit-editor-site-editor

Comment @coderabbitai help to get the list of available commands and usage tips.

@ViewFromTheBox ViewFromTheBox moved this from Backlog to In Review in ArtisanPack UI Overview Jun 4, 2026
@ViewFromTheBox
ViewFromTheBox marked this pull request as ready for review June 4, 2026 19:53
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":500,"request":{"method":"PATCH","url":"https://api.github.com/repos/ArtisanPack-UI/visual-editor/issues/comments/4625561917","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- review_stack_entry_start -->\n\n[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/ArtisanPack-UI/visual-editor/pull/535?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)\n\n<!-- review_stack_entry_end -->\n<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->\n\n> [!NOTE]\n> Currently processing new changes in this PR. This may take a few minutes, please wait...\n> \n> <details>\n> <summary>⚙️ Run configuration</summary>\n> \n> **Configuration used**: Path: .coderabbit.yaml\n> \n> **Review profile**: CHILL\n> \n> **Plan**: Pro\n> \n> **Run ID**: `cf85c5cb-0f8d-44b2-9393-85ea38199669`\n> \n> </details>\n> \n> <details>\n> <summary>📥 Commits</summary>\n> \n> Reviewing files that changed from the base of the PR and between 89fb96e25369d01b1bce6de56c772aed03be4c7a and 53f4665f4258362e9ef0f008d6974980eaa0bf18.\n> \n> </details>\n> \n> <details>\n> <summary>📒 Files selected for processing (25)</summary>\n> \n> * `resources/js/visual-editor/a11y.css`\n> * `resources/js/visual-editor/editor/__tests__/top-bar.test.tsx`\n> * `resources/js/visual-editor/editor/block-library-sidebar.css`\n> * `resources/js/visual-editor/editor/editor-app.tsx`\n> * `resources/js/visual-editor/editor/main.tsx`\n> * `resources/js/visual-editor/editor/top-bar.tsx`\n> * `resources/js/visual-editor/site-editor/create-entity-dialog.tsx`\n> * `resources/js/visual-editor/site-editor/main.tsx`\n> * `resources/js/visual-editor/site-editor/navigation/create-menu-dialog.tsx`\n> * `resources/js/visual-editor/site-editor/navigation/link-picker.tsx`\n> * `resources/js/visual-editor/site-editor/navigation/navigation-canvas.css`\n> * `resources/js/visual-editor/site-editor/navigation/navigation-canvas.tsx`\n> * `resources/js/visual-editor/site-editor/navigation/navigation-inspector.tsx`\n> * `resources/js/visual-editor/site-editor/navigator-sidebar.css`\n> * `resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx`\n> * `resources/js/visual-editor/site-editor/patterns/pattern-dialog.tsx`\n> * `resources/js/visual-editor/site-editor/patterns/pattern-inspector.tsx`\n> * `resources/js/visual-editor/site-editor/sidebars/global-styles-sidebar.tsx`\n> * `resources/js/visual-editor/site-editor/sidebars/menu-sidebar.tsx`\n> * `resources/js/visual-editor/site-editor/sidebars/pattern-sidebar.tsx`\n> * `resources/js/visual-editor/site-editor/sidebars/sidebar-frame.tsx`\n> * `resources/js/visual-editor/site-editor/sidebars/template-sidebar.tsx`\n> * `resources/js/visual-editor/site-editor/site-editor-app.css`\n> * `resources/js/visual-editor/site-editor/site-editor-app.tsx`\n> * `resources/js/visual-editor/site-editor/styles/styles-navigator.tsx`\n> \n> </details>\n> \n> ```ascii\n>  _____________________________________________________________________________________________________________\n> < Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. >\n>  -------------------------------------------------------------------------------------------------------------\n>   \\\n>    \\   (\\__/)\n>        (•ㅅ•)\n>        /   づ\n> ```\n\n<!-- end of auto-generated comment: review in progress by coderabbit.ai -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>📝 Generate docstrings</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> Create stacked PR\n- [ ] <!-- {\"checkboxId\": \"3e1879ae-f29b-4d0d-8e06-d12b7ba33d98\"} --> Commit on current branch\n\n</details>\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `a11y/450-wcag-audit-editor-site-editor`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n<!-- tips_start -->\n\n---\n\n\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->"},"request":{"retryCount":3,"signal":{},"retries":3,"retryAfter":16}}}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
resources/js/visual-editor/editor/block-library-sidebar.css (1)

218-227: ⚡ Quick win

Simplify conflicting height constraints for clarity.

The button has both height: 16px (line 221) and min-height: 24px (line 222). Since min-height takes precedence, the height: 16px declaration is effectively overridden. This creates confusion between the original layout goal mentioned in the comment above ("shrink the buttons to 16px tall") and the new WCAG 2.5.5 Level AA requirement for 24×24 minimum target sizes.

Consider either removing the height: 16px declaration or updating the comment to clarify that the 24px minimum is an accessibility override.

♻️ Proposed simplification
 .ap-visual-editor-block-library__panel--layouts
     .block-editor-list-view-leaf
     .block-editor-block-mover-button {
-    height: 16px;
     min-height: 24px;
     width: 28px;
     min-width: 24px;
     margin: 0;
     padding: 0;
 }

Alternatively, update the comment to document the accessibility override:

 /**
  * Tighten the Layouts list-view up/down movers. Gutenberg's default
  * rules target a `.mover-cell-alignment-wrapper` class that's no
  * longer rendered (the wrapper moved inside `TreeGridItem` divs in a
  * recent refactor), so the two buttons stack with the table cell's
  * natural vertical-align spacing, leaving a big gap between ^ and v.
- * These overrides shrink the buttons to 16px tall and zero their
- * surrounding margins so the arrows sit snugly one atop the other.
+ * These overrides zero the surrounding margins so the arrows sit snugly
+ * one atop the other, while maintaining the 24×24px minimum required
+ * by WCAG 2.5.5 Level AA (Target Size).
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/visual-editor/editor/block-library-sidebar.css` around lines 218
- 227, The CSS for .ap-visual-editor-block-library__panel--layouts
.block-editor-list-view-leaf .block-editor-block-mover-button contains
conflicting height rules (height: 16px and min-height: 24px); since min-height
wins this is confusing — either remove the explicit height: 16px declaration or
keep it but update the adjacent comment to state that min-height: 24px is an
intentional WCAG accessibility override for 24×24 targets; modify the rule for
.ap-visual-editor-block-library__panel--layouts .block-editor-list-view-leaf
.block-editor-block-mover-button accordingly and update the comment above it to
reflect which behavior is intended (shrunk 16px vs accessibility-enforced 24px).
resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx (1)

308-369: ⚡ Quick win

Consider adding aria-describedby to the sync radio group for consistency.

The sync radio group displays validation errors (lines 360-368) but doesn't wire them via aria-describedby, unlike every other validated field in this PR. For consistency with the pattern applied to text inputs and selects, consider generating a syncErrorId and adding aria-describedby={validationErrors?.sync?.[0] !== undefined ? syncErrorId : undefined} to the <fieldset> element.

The current implementation works (the error has role="alert" and is structurally within the fieldset), but explicit association would align with WCAG 2.2 best practices and match the rest of this PR's approach.

♻️ Proposed enhancement

Add at line 105:

 const slugErrorId = useId();
+const syncErrorId = useId();

Update the fieldset at line 308:

-<fieldset className="ap-pattern-dialog__field">
+<fieldset 
+    className="ap-pattern-dialog__field"
+    aria-describedby={
+        validationErrors?.sync?.[0] !== undefined
+            ? syncErrorId
+            : undefined
+    }
+>

Update the error paragraph at line 361:

 <p
+    id={syncErrorId}
     className="ap-pattern-dialog__error"
     role="alert"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx`
around lines 308 - 369, The sync radio fieldset is not associating its
validation message via aria-describedby like other fields; create a unique id
(e.g., syncErrorId) and use it when an error exists: generate syncErrorId near
the other ID constants, add aria-describedby={validationErrors?.sync?.[0] !==
undefined ? syncErrorId : undefined} to the <fieldset> that renders the sync
radios, and set the error <p> (which already uses role="alert" and
data-testid="ap-pattern-dialog-create-sync-error") to have id={syncErrorId};
update references around the sync state/validation (sync, setSync,
validationErrors) to ensure the id is present only when an error exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@resources/js/visual-editor/editor/block-library-sidebar.css`:
- Around line 218-227: The CSS for
.ap-visual-editor-block-library__panel--layouts .block-editor-list-view-leaf
.block-editor-block-mover-button contains conflicting height rules (height: 16px
and min-height: 24px); since min-height wins this is confusing — either remove
the explicit height: 16px declaration or keep it but update the adjacent comment
to state that min-height: 24px is an intentional WCAG accessibility override for
24×24 targets; modify the rule for
.ap-visual-editor-block-library__panel--layouts .block-editor-list-view-leaf
.block-editor-block-mover-button accordingly and update the comment above it to
reflect which behavior is intended (shrunk 16px vs accessibility-enforced 24px).

In `@resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx`:
- Around line 308-369: The sync radio fieldset is not associating its validation
message via aria-describedby like other fields; create a unique id (e.g.,
syncErrorId) and use it when an error exists: generate syncErrorId near the
other ID constants, add aria-describedby={validationErrors?.sync?.[0] !==
undefined ? syncErrorId : undefined} to the <fieldset> that renders the sync
radios, and set the error <p> (which already uses role="alert" and
data-testid="ap-pattern-dialog-create-sync-error") to have id={syncErrorId};
update references around the sync state/validation (sync, setSync,
validationErrors) to ensure the id is present only when an error exists.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cf85c5cb-0f8d-44b2-9393-85ea38199669

📥 Commits

Reviewing files that changed from the base of the PR and between 89fb96e and 53f4665.

📒 Files selected for processing (25)
  • resources/js/visual-editor/a11y.css
  • resources/js/visual-editor/editor/__tests__/top-bar.test.tsx
  • resources/js/visual-editor/editor/block-library-sidebar.css
  • resources/js/visual-editor/editor/editor-app.tsx
  • resources/js/visual-editor/editor/main.tsx
  • resources/js/visual-editor/editor/top-bar.tsx
  • resources/js/visual-editor/site-editor/create-entity-dialog.tsx
  • resources/js/visual-editor/site-editor/main.tsx
  • resources/js/visual-editor/site-editor/navigation/create-menu-dialog.tsx
  • resources/js/visual-editor/site-editor/navigation/link-picker.tsx
  • resources/js/visual-editor/site-editor/navigation/navigation-canvas.css
  • resources/js/visual-editor/site-editor/navigation/navigation-canvas.tsx
  • resources/js/visual-editor/site-editor/navigation/navigation-inspector.tsx
  • resources/js/visual-editor/site-editor/navigator-sidebar.css
  • resources/js/visual-editor/site-editor/patterns/create-pattern-dialog.tsx
  • resources/js/visual-editor/site-editor/patterns/pattern-dialog.tsx
  • resources/js/visual-editor/site-editor/patterns/pattern-inspector.tsx
  • resources/js/visual-editor/site-editor/sidebars/global-styles-sidebar.tsx
  • resources/js/visual-editor/site-editor/sidebars/menu-sidebar.tsx
  • resources/js/visual-editor/site-editor/sidebars/pattern-sidebar.tsx
  • resources/js/visual-editor/site-editor/sidebars/sidebar-frame.tsx
  • resources/js/visual-editor/site-editor/sidebars/template-sidebar.tsx
  • resources/js/visual-editor/site-editor/site-editor-app.css
  • resources/js/visual-editor/site-editor/site-editor-app.tsx
  • resources/js/visual-editor/site-editor/styles/styles-navigator.tsx
💤 Files with no reviewable changes (2)
  • resources/js/visual-editor/editor/top-bar.tsx
  • resources/js/visual-editor/site-editor/styles/styles-navigator.tsx

- block-library-sidebar.css: drop overridden height: 16px and reword
  the comment to document the 24x24 min-size as a WCAG 2.5.5 AA
  override.
- create-pattern-dialog.tsx: wire the sync radio fieldset to its error
  via aria-describedby + syncErrorId, matching the rest of the dialog.
@ViewFromTheBox
ViewFromTheBox merged commit 57cdc88 into release/1.0 Jun 4, 2026
4 checks passed
@ViewFromTheBox
ViewFromTheBox deleted the a11y/450-wcag-audit-editor-site-editor branch June 4, 2026 20:10
@github-project-automation github-project-automation Bot moved this from In Review to Done in ArtisanPack UI Overview Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Accessibility audit — full WCAG pass on the post editor + site editor before v1.0

1 participant