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: h3Things 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.
Comments
Comment #2
steinmb commented#3293469: Automated A11y tests in Nightwatch is now in, unblocking
Comment #3
bnjmnmComment #5
dmundraThe '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
h3for '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?Comment #6
dmundraI found the related issue discussing the header change https://www.drupal.org/project/drupal/issues/3182458
Comment #7
dmundraI believe this one is the search block duplicate ID issue https://www.drupal.org/project/drupal/issues/1852090
Comment #8
kentr commentedIf we're following WCAG 2.2, the
duplicate-id-ariaerror 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.Comment #10
mgiffordDuplicate 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
Comment #11
quietone commentedThe 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.
Comment #12
kentr commented#3584694: Remove Search module from nightwatch_a11y_testing profile & tests should remove lingering cases of the search module in Nightwatch a11y tests.
Comment #13
kentr commentedI think this is outdated now that #3584694: Remove Search module from nightwatch_a11y_testing profile & tests has landed.