From 8c298f14bb54ce5538be132c13ff96ba11b10c53 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Tue, 30 Jan 2024 16:12:06 +0800 Subject: [PATCH 1/2] MDL-79674 behat: axe-core version fixes * Update \behat_accessibility::run_axe_validation_for_tags()'s PHPDoc block to reflect the current version. * Fix incorrect copyright tag for the library --- lib/tests/behat/behat_accessibility.php | 2 +- lib/thirdpartylibs.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/behat/behat_accessibility.php b/lib/tests/behat/behat_accessibility.php index 022a7aed7f1..61eaf5a4235 100644 --- a/lib/tests/behat/behat_accessibility.php +++ b/lib/tests/behat/behat_accessibility.php @@ -46,7 +46,7 @@ class behat_accessibility extends behat_base { * It is also possible to specify any desired optional tags. * * The list of available tags can be found at - * https://github.com/dequelabs/axe-core/blob/v3.5.5/doc/rule-descriptions.md. + * https://github.com/dequelabs/axe-core/blob/v4.5.1/doc/rule-descriptions.md. * * @Then the page should meet accessibility standards * @Then the page should meet accessibility standards with :extratags extra tests diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml index da2006dd353..46918f5948d 100644 --- a/lib/thirdpartylibs.xml +++ b/lib/thirdpartylibs.xml @@ -22,7 +22,7 @@ 2.0 https://github.com/dequelabs/axe-core - 2005, Jon Papaioannou + Deque Systems, Inc. From b3867e74229ad1bdd88fa285e35d3a3ef3a0c528 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Tue, 30 Jan 2024 16:04:05 +0800 Subject: [PATCH 2/2] MDL-79674 behat: Use proper tags for testing WCAG 2.1 criteria `wcag2a` and `wcag2aa` refer to WCAG 2.0 standards. We should be using `wcag21a` and `wcag21aa` to test against WCAG 2.1 standards. See: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#axe-core-tags --- lib/tests/behat/behat_accessibility.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tests/behat/behat_accessibility.php b/lib/tests/behat/behat_accessibility.php index 61eaf5a4235..d2013670bdf 100644 --- a/lib/tests/behat/behat_accessibility.php +++ b/lib/tests/behat/behat_accessibility.php @@ -191,10 +191,10 @@ EOF; if (empty($standardtags)) { $standardtags = [ // Meet WCAG 2.1 A requirements. - 'wcag2a', + 'wcag21a', // Meet WCAG 2.1 AA requirements. - 'wcag2aa', + 'wcag21aa', // Meet Section 508 requirements. // See https://www.epa.gov/accessibility/what-section-508 for detail. @@ -203,7 +203,7 @@ EOF; // Ensure that ARIA attributes are correctly defined. 'cat.aria', - // Requiremetns for sensory and visual cues. + // Requirements for sensory and visual cues. // These largely related to viewport scale and zoom functionality. 'cat.sensory-and-visual-cues',