···270270 * Creates "Cannot find element" error. Useful for custom locators.
271271 */
272272 getElementError(selector: string, container?: Element): Error
273273+ /**
274274+ * Utilities for generating and working with ARIA trees and templates.
275275+ * @experimental
276276+ */
277277+ aria: {
278278+ generateAriaTree(rootElement: Element): AriaNode
279279+ renderAriaTree(root: AriaNode): string
280280+ renderAriaTemplate(template: AriaTemplateNode): string
281281+ parseAriaTemplate(text: string): AriaTemplateNode
282282+ matchAriaTree(root: AriaNode, template: AriaTemplateNode): { pass: boolean; resolved: string }
283283+ }
273284}
274285```
275286···340351::: tip
341352This feature is inspired by Testing Library's [`defaultIgnore`](https://testing-library.com/docs/dom-testing-library/api-configuration/#defaultignore) configuration.
342353:::
354354+355355+### aria <Version type="experimental">5.0.0</Version> {#aria}
356356+357357+The `aria` namespace exposes low-level utilities used by Vitest's ARIA snapshot matchers.
358358+359359+```ts
360360+import { utils } from 'vitest/browser'
361361+362362+document.body.innerHTML = `
363363+ <h1>Hello, World!</h1>
364364+ <button aria-hidden="true">Hidden</button>
365365+ <button>Visible</button>
366366+`
367367+const tree = utils.aria.generateAriaTree(document.body)
368368+const yaml = utils.aria.renderAriaNode(tree)
369369+console.log(yaml)
370370+// - heading "Hello, World!" [level=1]
371371+// - button "Visible""
372372+```
+2
docs/guide/browser/aria-snapshots.md
···30303131This catches accessibility regressions: missing labels, broken roles, incorrect heading levels, and more — things that DOM snapshots would miss. Even if the underlying HTML structure changes, the assertion would not fail as long as content matches semantically.
32323333+For advanced cases, you can also generate and inspect the ARIA tree through `utils.aria` from `vitest/browser`. See the [Context API](/api/browser/context#aria) for details.
3434+3335## Snapshot Workflow
34363537ARIA snapshots use the same Vitest snapshot workflow as other snapshot assertions. File snapshots, inline snapshots, `--update` / `-u`, watch mode updates, and CI snapshot behavior all work the same way.
+1
packages/browser/src/vendor-types.ts
···11+export type * as __ivyaAriaTypes from 'ivya/aria'