Skip to content

feat(devtools): add the a11y inspector plugin - #1

Closed
antfubot wants to merge 33 commits into
mainfrom
feat/a11y-plugin
Closed

feat(devtools): add the a11y inspector plugin#1
antfubot wants to merge 33 commits into
mainfrom
feat/a11y-plugin

Conversation

@antfubot

Copy link
Copy Markdown
Owner

What

Integrate the @devframes/plugin-a11y accessibility inspector into Nuxt DevTools. It mounts a panel in the Nuxt dock group that runs axe-core against the running app, lists WCAG A/AA violations, and highlights the offending element in the page on hover.

The panel is enabled by default and can be turned off with devtools.a11y.enabled = false.

Why

DevTools now hosts devframe plugins directly (Data Inspector, Code Server). Accessibility feedback is a natural next panel, and the upstream plugin already provides the scanner, panel, and in-page agent — this wires it into the Nuxt dock group following the same integration pattern.

Notes

  • Follows the established integration shape: a setup(ctx) module that builds the devframe definition and mountDevframes it into the nuxt group. The plugin's in-page agent (a11yAgentBundlePath) is attached as the dock's clientScript so the panel can actually scan the host page.
  • The plugin's exact devframe peer requires realigning the whole devframe stack on one line: devframe/@devframes/hub/sibling plugins → 0.7.11, @vitejs/devtools(-kit)0.4.5. The Vite ~8.0.16 pin is unaffected (@vitejs/devtools@0.4.5 keeps vite: "*").
  • Adds unit coverage and an e2e spec mirroring the Data Inspector spec, plus a docs feature section.
  • The plugin is upstream-experimental; the option and docs call this out.

This PR was created with the help of an agent.

antfubot and others added 30 commits June 15, 2026 14:47
…compat foundation + dock groups + terminals/messages + ecosystem) (nuxt#1011)
…dation (nuxt#1021)

Co-authored-by: Anthony Fu <github@antfu.me>
…ient; fix client RPC registration (nuxt#1023)

* fix(devtools): force-register client RPC functions and deprecate extendClientRpc

The legacy client RPC proxy registered its event functions (refresh, callHook,
onTerminalData, onTerminalExit, navigateTo) via a has()->update()/register()
dance that could throw DF0022 ("not registered"). Force-register instead so it
is an idempotent override, fixing the errors and making registration robust
across (re)connect and integration overrides.

`extendClientRpc` now overrides by default (via the forced upsert) and is
deprecated in favour of registering on the devframe client context
(`getDevToolsRpcClient()` / `getDevToolsClientContext()` from
`@vitejs/devtools-kit/client`).

Created with the help of an agent.

* feat(devtools): expose the Vite DevTools client on NuxtDevtoolsClient

Mirror the server-side `nuxt.devtools.devtoolsKit` on the client: the injected
`client.devtools` now carries `devtoolsKit`, the connected Vite DevTools RPC
client, giving module authors full devframe-native access (register client RPC
functions, call server functions, shared state, streaming, scoping) without
importing from `@vitejs/devtools-kit/client` themselves.

`extendClientRpc`'s deprecation now points at
`client.devtools.devtoolsKit?.client.register(...)`.

Created with the help of an agent.

* feat(devtools): add client-side onDevtoolsReady hook

Mirror the server's `onDevtoolsReady` on the client: exported from
`@nuxt/devtools-kit/iframe-client`, it runs once the Vite DevTools client is
connected and hands back the `DevToolsRpcClient` (`client.devtools.devtoolsKit`),
the recommended entry point for client-side integration (register client RPC,
call server functions, shared state, streaming, ...).

`extendClientRpc`'s deprecation now points at this hook.

Created with the help of an agent.

* docs(devtools): explain the devframe force-param type-gap cast
…uxt#1022)

Co-authored-by: opencode <noreply@opencode.ai>
Co-authored-by: Anthony Fu <github@antfu.me>
…gin (nuxt#1034)

Co-authored-by: Anthony Fu <github@antfu.me>
antfu and others added 3 commits July 23, 2026 13:29
Mount @devframes/plugin-a11y into the Nuxt dock group so DevTools surfaces
an axe-core accessibility inspector for the running app, gated behind a new
devtools.a11y option (enabled by default). Aligns the whole devframe stack on
the 0.7.11 / 0.4.5 line, which the plugin's exact devframe peer requires.
@antfubot

Copy link
Copy Markdown
Owner Author

Superseded by nuxt#1038 (retargeted to upstream).

@antfubot antfubot closed this Jul 24, 2026
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.

3 participants