Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25292

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

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 7.3-milestone-1
    • Test Framework
    • None
    • Unknown

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: