This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-6ad5732d-3fa9-4c29-9632-566df0b3cb3e XWIKI-25292 Open

Allow page tests to validate the rendered HTML with axe-core

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-f57ee98f-3704-4f94-8957-ffc67210212e Charpentier Lucas created this issue on 14/Oct/26 12:15
 
Summary: Allow page tests to validate the rendered HTML with axe-core
Issue Type: cid:jira-generated-image-avatar-6ad5732d-3fa9-4c29-9632-566df0b3cb3e Improvement
Affects Versions: 7.3-milestone-1
Assignee: Unassigned
Components: Test Framework
Created: 14/Oct/26 12:15
Priority: cid:jira-generated-image-static-major-aacb80cb-34ba-4987-a6c7-4e50f2d60f38 Major
Reporter: Charpentier Lucas
Description:

Page tests (PageTest) render templates and wiki pages to HTML, but nothing checks that HTML for accessibility. Problems such as an icon-only button without an accessible name (see XWIKI-25161) are only caught by the Docker functional tests, and only when the test happens to display the faulty UI, which is often not the case for modals (see XWIKI-22260).

Vue component tests already have an axe-core assertion for this: assertAxe, from xwiki-platform-node/src/main/node/core/test/accessibility, documented at https://www.xwiki.org/xwiki/bin/view/documentation/xs/dev/front-end/test/test-vue-component-accessibility/

Proposal

Provide a similar helper for page tests, so that a test can run axe-core on the HTML it renders and fail on violations, the same way assertAxe does for Vue components.