MDL-82373 behat: Disable axe target-size rule

Disable the target-size rule.
This rule was added in Axe 4.7, but changed in 4.8 to allow for spacing
around the element. See https://github.com/dequelabs/axe-core/pull/4117
for more information on this change.

Moodle 4.2 has an earlier version of Axe which does not have this rule.
Moodle 4.4 has a later, unaffected, version of Axe.

The simplest solution here is to simply disable the buggy rule.
This commit is contained in:
Andrew Nicols
2024-07-17 22:51:35 +08:00
parent f08c8b7db7
commit 42fb4adf3e
+8
View File
@@ -218,6 +218,14 @@ EOF;
'type' > 'tag',
'values' => array_merge($standardtags, $extratags),
],
'rules' => [
// Disable the target-size rule.
// This rule was added in Axe 4.7, but changed in 4.8 to allow for spacing around the element.
// See https://github.com/dequelabs/axe-core/pull/4117 for more information on this change.
'target-size' => [
'enabled' => false,
],
]
]);
}
}