Skip to content

HTML-AAM Test Structure #62897

Open
Open

Description

@lolaodelola

This is following from a conversation we had in the Interop Accessibility meeting about structuring tests for Accessibility Compat Data.

TLDR: Can we start to separate the element sub-tests out of the generic role/name test files into their own test files?

We need a way to get all the tests and sub-tests related to specific HTML-AAM features. In the proof-of-concept app for ACD, it became clear that the way the HTML-AAM tests & sub-tests are structured makes it difficult to get only the sub-tests we need, we've explored a number of different avenues with meta-data, having an ACD directory which we could manage, etc which all have their own issues.

But looking at the directory structure again, I think the solution might be more simple. The HTML-AAM directory looks like:

html-aam/
├── accname-computation-by-element/
├── heading/
├── scripts/
├── META.yml
├── WEB_FEATURES.yml
├── area-role.html
├── aside-in-prefixed-article.html
├── dir-role.tentative.html
├── figure-name-no-figcaption.tentative.html
├── hidden-names.html
├── img-src-srcset-roles.tentative.html
├── names.html
├── optgroup-role.tentative.html
├── roles-contextual.html
├── roles-contextual.tentative.html
├── roles-dynamic-switch.tentative.window.js
├── roles-generic.html
├── roles-generic.tentative.html
├── roles-minimum.tentative.html
├── roles.html
├── roles.tentative.html
└── table-roles.html

This isn't reflective of how the spec defines it's features/algorithms, and following @cookiecrook's advice in the Aug 3rd meeting, since WPT is categorised by spec, the spec directories should also map cleanly to the spec. For example, @adampage has already structured the accname-computation-by-element closer to how the spec defines the accname computation and the WPT directory structure for core-aam looks like:

role/
├── alert.py
├── alertdialog.py
├── application.py
├── article.py
├── banner.py
├── blockquote.py
├── button.py
├── button_haspopup.py
├── button_pressed.py
├── caption.py
├── cell.py
├── checkbox.py
├── code-role.py
├── columnheader.py
├── combobox.py
├── comment.py
├── complementary.py
├── contentinfo.py
├── definition.py
├── deletion.py
├── dialog.py
├── directory.py
├── document.py
├── emphasis.py
├...
└── treeitem.py

This file structure would be easier for consumers of WPT and be more legible for test-writers.

Activity

  1. cookiecrook commented on Oct 7, 2026

    @cookiecrook
    Contributor

    Oct 7, 2026 consensus: group supports moving these tests to individual files...

  2. scottaohara commented on Oct 8, 2026

    @scottaohara
    Contributor

    very happy to hear about the idea of revising the html-aam test structure.

    would the tests be separated out by html element, where all applicable tests for an HTML element (or combo of elements) would be in a single file?

    or would each html element get its own folder that would then allow for individual tests for specific features related to that HTML element?

    other?

    regardless of the answer, thanks again for proposing this change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions