Skip to content

Commit

Permalink
Update "helpUrl" for each error
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinJJones committed Aug 6, 2024
1 parent e25be8e commit b84cb88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('AccessibilityTest', function () {
problem: 'Elements must meet minimum color contrast ratio thresholds',
html: '<a href="#">Low contrast</a>',
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)
Expand All @@ -120,7 +120,7 @@ describe('AccessibilityTest', function () {
problem: 'Images must have alternate text',
html: '<img src="">',
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)
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -167,7 +167,7 @@ describe('AccessibilityTest', function () {
problem: 'Elements must meet minimum color contrast ratio thresholds',
html: '<a href="#">Low contrast</a>',
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({
Expand All @@ -176,7 +176,7 @@ describe('AccessibilityTest', function () {
problem: 'Images must have alternate text',
html: '<img src="">',
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'
})
)

Expand Down

0 comments on commit b84cb88

Please sign in to comment.