Update the profile used in Nightwatch A11y tests

Created on 21 January 2025, 9 days ago

Problem/Motivation

Following up on #2857808: Automate Accessibility Checks for Core , I found that some Axe issues in a standard install are going unreported because of the limited module list for the nightwatch_a11y_testing profile.

Here's a report from yarn test:nightwatch --tag a11y on 11.x@c6bc6ebf274:

  ️TEST FAILURE (42.938s):  
   - 14 assertions failed; 394 passed

   ✖ 1) Tests/a11yTestAdmin

   – Accessibility - Admin Theme: User Edit (3.155s)

   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Create Article (2.499s)

   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Create Page (1.543s)

   → ✖ NightwatchAssertError
   aXe rule: link-name - Links must have discernible text
	In element: a[href$="node"]
   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Content Page (1.427s)

   → ✖ NightwatchAssertError
   aXe rule: empty-table-header - Table header text should not be empty
	In element: .select-all
   → ✖ NightwatchAssertError
   aXe rule: landmark-unique - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
	In element: .home-toolbar-tab > div > .toolbar-lining
   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Structure Page (1.282s)

   → ✖ NightwatchAssertError
   aXe rule: landmark-unique - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
	In element: .home-toolbar-tab > div > nav
   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Add content type (1.51s)

   → ✖ NightwatchAssertError
   aXe rule: landmark-unique - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
	In element: .home-toolbar-tab > div > nav
   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Add vocabulary (1.308s)

   → ✖ NightwatchAssertError
   aXe rule: landmark-unique - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
	In element: .home-toolbar-tab > div > nav
   → ✖ NightwatchAssertError
   aXe rule: region - All page content should be contained by landmarks
	In element: #toolbar-administration

   – Accessibility - Admin Theme: Structure | Block (2.097s)

   → ✖ NightwatchAssertError
   aXe rule: landmark-unique - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
	In element: .home-toolbar-tab > div > .toolbar-lining

I believe that the Axe errors reported by 🐛 Edit menu item does not have a unique landmark Postponed are really core errors, one being in this list and one related to this list but not seen because the test conditions don't expose it.

This issue is only meant to address the testing installation profile itself, not the individual Axe errors.

Steps to reproduce

  1. Set up for Nightwatch testing according to the documentation.
  2. In the a11y test files, replace nightwatch_a11y_testing with standard.
  3. Run the a11y tests with yarn test:nightwatch --tag a11y.

Proposed resolution

Either add the following modules to the nightwatch_a11y_testing profile, or use the standard profile instead. There's background in 📌 Automated A11y tests in Nightwatch Fixed .

  # I narrowed the Axe errors that were seen
  # from the `standard` profile down to these 
  # modules.
  - announcements_feed
  - toolbar
  - views
📌 Task
Status

Active

Version

11.0 🔥

Component

other

Created by

🇺🇸United States kentr

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024