Blocked on #3293469: Automated A11y tests in Nightwatch, which performs the checks that surfaced this

Problem/Motivation

The tests added in #3293469: Automated A11y tests in Nightwatch identified the following when visiting /search/node

08:56:58   ✖ NightwatchAssertError
08:56:58    aXe rule: duplicate-id-aria - IDs used in ARIA and labels must be unique
08:56:58 	In element: ...search-block-form > .form-no-label.js-form-item.form-item > .form-search[size="15"][maxlength="128"]
08:56:58   ✖ NightwatchAssertError
08:56:58    aXe rule: heading-order - Heading levels should only increase by one
08:56:58 	In element: h3

Things to consider:

  • If it is easier to split this into multiple issues, that should happen.
  • These tests were performed with Olivero as theme, so it is possible some A11y fails are Olivero specific, vs. originating from the Search module. For any given issue where that is the case, change the Component to Olivero.
  • If any of the a11y errors are considered acceptable (either false positives or there's a tradeoff that provides greater benefit), it's possible to leave something unfixed, but the rationale should be documented within the code.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bnjmnm created an issue. See original summary.

steinmb’s picture

Status: Postponed » Active
bnjmnm’s picture

Title: [PP-1] Address A11y test fails in search/node » Address A11y test fails in search/node

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dmundra’s picture

The 'header-order' error is caused by 'Your search yielded no results.' being an h3.

Linking to some historical context of why that was the case:

* https://www.drupal.org/project/drupal/issues/1926344#comment-8256493, mentions the header issue with multiple h3s and making 'Search results' an h2.
* https://www.drupal.org/project/drupal/issues/1926344#comment-8418527, suggested dropping 'Search results' from being displayed if no results but leaving the h3 for 'Your search yielded no results'.

So the question is should we change 'Your search yielded no results' to h2? But does it need to be a header, could it be a paragraph. That point was raised in https://www.drupal.org/project/drupal/issues/1926344#comment-8256063 and the comment was valid to leave it a header because of the help text after it. Since the help text has been removed maybe setting to a paragraph is fine now?

dmundra’s picture

dmundra’s picture

I believe this one is the search block duplicate ID issue https://www.drupal.org/project/drupal/issues/1852090

kentr’s picture

If we're following WCAG 2.2, the duplicate-id-aria error appears to be obsolete.

Dequeue lists it as SC 4.1.1 Parsing, which was removed in WCAG 2.2.

If we're keeping that item active, the priority should perhaps be Critical (matching Dequeue's User Impact level).

The other one (heading-order) is a Dequeue Best Practice.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

mgifford’s picture

Duplicate id's may still be a problem for other reasons. Basic QA for instance. But they aren't a WCAG SC issue.

Agreed on prioritizing on Deque's critical, serious, moderate and minor scale.

It's listed as moderate:
https://dequeuniversity.com/rules/axe/3.5/heading-order

quietone’s picture

Status: Active » Postponed

The Search Module was approved for removal in #3476883: [Policy, no patch] Move Search module to contrib .

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3565780: [meta] Tasks to deprecate the Search module and the removal work in #3565783: [meta] Tasks to remove the Search module.

Search will be moved to a contributed project before Drupal 12.0.0 is released.

kentr’s picture

#3584694: Remove Search module from nightwatch_a11y_testing profile & tests should remove lingering cases of the search module in Nightwatch a11y tests.

kentr’s picture

Status: Postponed » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.