Skip to content

feat: a11y focus ring checks - #3308

Merged
matthewlipski merged 2 commits into
a11y-testingfrom
a11y-focus-visual
Nov 9, 2026
Merged

matthewlipski merged 2 commits into
a11y-testingfrom
a11y-focus-visual

Conversation

@matthewlipski

Copy link
Copy Markdown
Collaborator

Summary

This PR changes how focus rings are checked in a11y tests. Previously, we used visual snapshots, whereas we now inspect the computed styles of an element and check for a visible outline.

Rationale

Visual snapshots can be annoying to validate.

Changes

See above.

Impact

N/A

Testing

See above.

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

N/A

@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Ready Ready Preview Nov 6, 2026 10:59am UTC
blocknote-website Ready Ready Preview Nov 6, 2026 10:59am UTC

Request Review

@matthewlipski
matthewlipski changed the base branch from main to a11y-testing November 6, 2026 10:57
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5db8baf5-066b-4f5f-ac54-129f3cbbed1d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3308

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3308

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3308

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3308

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3308

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3308

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3308

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3308

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3308

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3308

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3308

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3308

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3308

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3308

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3308

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3308

commit: fe8fa0a

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-11-09 10:39 UTC

@nperez0111 nperez0111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great @matthewlipski this will be much more stable

@matthewlipski
matthewlipski merged commit ae305d4 into a11y-testing Nov 9, 2026
37 checks passed
@matthewlipski
matthewlipski deleted the a11y-focus-visual branch November 9, 2026 10:13
matthewlipski added a commit that referenced this pull request Nov 19, 2026
* Initial a11y testing setup

* Migrated from Playwright to Vitest Browser Mode

* Small refactor

* Moved axe scans to separate test files

* Added read-only tests and moved interactive block tests vertical slice from check list items to toggle headings

* Removed `crypto.randomUUID` calls and added lint rule to disallow `getByTestId`

* Made `saveTranscript` throw error when `screenReader` is not defined.

* Changed animation handling for axe scans

* Rename `spec` -> `test`

* Added `@root` shorthand

* Cleanup

* Implemented remaining PR feedback

* Small axe changes

* Reworked axe scan document fixtures to cover much more issues (contrast especially)

* Skipped failing tests

* Updated GuidePup

* Added comments for skipped tests

* Added ARIA snapshotting, removed screen reader testing from CI

* Merged main

* Updated visual snapshots with masks for videos

* Fixed flaky behaviour in formatting toolbar block type select focus

* Updated a11y.yml

* Reverted better auth version update in lockfile

* Added setup script to always wait 20ms when editor is focused to wait for ProseMirror's selection reconciliation

* Refactored formatting toolbar tests

* Refactored remaining tests

* Implemented PR feedback

* Removed separate config and GH workflow for a11y tests

* Implemented PR feedback

* Fixed build

* Updated screenshots

* Fixed test

* Skipped failing a11y test

* Updated agent skills

* feat: a11y focus ring checks (#3308)

* Changed focus ring tests from capturing visual snapshots to inspecting computed styles

* Updated remaining tests to inspect computed styles

* Implemented PR feedback

* Updated skill

* Small fixes

* Removed obsolete snapshots

* Refactored a11y test helpers

* Fixed review feedback

* test: cover BasicTextStyleButton with real editor interactions

* test: establish focused component testing examples

* Added lint rules for browser tests

* Updated full document keyboard navigation test

* Added key press limit to tests in addition to time limit

* test: complete toolbar accessibility coverage and shared commands

* test: refine shared fixtures and component testing conventions

* test: simplify focus capture and screen reader sessions

* refactor: better selectText result type

* docs: slightly stricter rules

* test: layer editor fixtures by environment

* test: refine document assertions and testing categories

* test: simplify document diffs into readable markup

* test: provide global editor fixtures for each environment

* chore(deps): replace fast-deep-equal with react-fast-compare (#3371)

* test: reuse react-fast-compare for document comparisons

* test: simplify document comparison rendering

* Updated heading tests

* Updated `mockCustomBlockImages` to match the convention of other commands

* Fixed CI

* Fixed merge issues

---------

Co-authored-by: Nick the Sick <computers@nickthesick.com>
Co-authored-by: Nick Perez <nick@blocknotejs.org>

This branch was successfully deployed

2 active deployments
Preview – blocknote-website — fe8fa0a8 Deployed Nov 6, 2026 by vercel[bot]
Preview – blocknote — fe8fa0a8 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants