diff --git a/package.json b/package.json index ea3f1a6867..57cc59fb05 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ } }, "dependencies": { - "axe-core": "^4.9.1", + "axe-core": "^4.10.0", "govuk-frontend": "5.1.0", "govuk-single-consent": "^3.0.9", "sortablejs": "^1.15.2" diff --git a/spec/component_guide/component_example_accessibility_testing_spec.rb b/spec/component_guide/component_example_accessibility_testing_spec.rb index 8ce68cd7bc..7df9f6cf9a 100644 --- a/spec/component_guide/component_example_accessibility_testing_spec.rb +++ b/spec/component_guide/component_example_accessibility_testing_spec.rb @@ -40,7 +40,7 @@ within ".component-guide-preview--warning" do expect(page).to have_selector("h3", text: "ARIA attributes must conform to valid values (aria-valid-attr-value)") - expect(page).to have_selector('h3 a[href*="https://dequeuniversity.com/rules/axe/4.9/aria-valid-attr-value?application=axeAPI"]', text: "(see guidance)") + expect(page).to have_selector('h3 a[href*="https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr-value?application=axeAPI"]', text: "(see guidance)") end end end diff --git a/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js b/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js index ea444b9514..a7c43c1a2e 100644 --- a/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js +++ b/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js @@ -97,7 +97,7 @@ describe('AccessibilityTest', function () { problem: 'Elements must meet minimum color contrast ratio thresholds', html: 'Low contrast', selector: 'a[href="#"]', - helpUrl: 'https://dequeuniversity.com/rules/axe/4.9/color-contrast?application=axeAPI' + helpUrl: 'https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=axeAPI' }) expect(violations).toBe(errorMessage) @@ -120,7 +120,7 @@ describe('AccessibilityTest', function () { problem: 'Images must have alternate text', html: '', selector: 'img', - helpUrl: 'https://dequeuniversity.com/rules/axe/4.9/image-alt?application=axeAPI' + helpUrl: 'https://dequeuniversity.com/rules/axe/4.10/image-alt?application=axeAPI' }) expect(violations).toBe(errorMessage) @@ -134,7 +134,7 @@ describe('AccessibilityTest', function () { AccessibilityTest(TEST_SELECTOR, function (_err, _violations, pageResults) { expect(pageResults.incompleteWarnings[0].summary).toBe('Elements must meet minimum color contrast ratio thresholds') - expect(pageResults.incompleteWarnings[0].url).toBe('https://dequeuniversity.com/rules/axe/4.9/color-contrast?application=axeAPI') + expect(pageResults.incompleteWarnings[0].url).toBe('https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=axeAPI') expect(pageResults.incompleteWarnings[0].selectors[0].selector[0]).toBe('a[href="#"]') expect(pageResults.incompleteWarnings[0].selectors[0].reasons[0]).toBe('Element\'s background color could not be determined due to a background image') done() @@ -146,7 +146,7 @@ describe('AccessibilityTest', function () { AccessibilityTest(TEST_SELECTOR, function (_err, _violations, pageResults) { expect(pageResults.violations[0].summary).toBe('Elements must meet minimum color contrast ratio thresholds') - expect(pageResults.violations[0].url).toBe('https://dequeuniversity.com/rules/axe/4.9/color-contrast?application=axeAPI') + expect(pageResults.violations[0].url).toBe('https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=axeAPI') expect(pageResults.violations[0].selectors[0].selector[0]).toBe('a[href="#"]') expect(pageResults.violations[0].selectors[0].reasons[0]).toBe('Element has insufficient color contrast of 1.35 (foreground color: #dddddd, background color: #ffffff, font size: 12.0pt (16px), font weight: normal). Expected contrast ratio of 4.5:1') done() @@ -167,7 +167,7 @@ describe('AccessibilityTest', function () { problem: 'Elements must meet minimum color contrast ratio thresholds', html: 'Low contrast', selector: 'a[href="#"]', - helpUrl: 'https://dequeuniversity.com/rules/axe/4.9/color-contrast?application=axeAPI' + helpUrl: 'https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=axeAPI' }) + '\n\n- - -\n\n' + renderErrorMessage({ @@ -176,7 +176,7 @@ describe('AccessibilityTest', function () { problem: 'Images must have alternate text', html: '', selector: 'img', - helpUrl: 'https://dequeuniversity.com/rules/axe/4.9/image-alt?application=axeAPI' + helpUrl: 'https://dequeuniversity.com/rules/axe/4.10/image-alt?application=axeAPI' }) ) diff --git a/yarn.lock b/yarn.lock index 9c557ebdfc..5f3610d67a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -427,10 +427,10 @@ async@^3.2.3: resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== -axe-core@^4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.9.1.tgz#fcd0f4496dad09e0c899b44f6c4bb7848da912ae" - integrity sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw== +axe-core@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" + integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== balanced-match@^1.0.0: version "1.0.2"