ember-a11y / ember-a11y-testing

A suite of accessibility tests that can be run within the Ember testing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unnecessary- Color Contrast violations on Disabled buttons.

Jagan1989 opened this issue · comments

For disabled variation of a button , we are getting the color contrast violation error while trying integration test using a11yAudit() helper.
I think it should not throw for disabled buttons. It is a false positive scenario as the buttons are disabled.

Result Object:
description
:
"Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds"
help
:
"Elements must have sufficient color contrast"
helpUrl
:
"https://dequeuniversity.com/rules/axe/2.1/color-contrast?application=axeAPI"
id
:
"color-contrast"
impact
:
"critical"

Below are the failure Summary:
failureSummary
:
"Fix any of the following:↵ Element has insufficient color contrast of 2.85 (foreground color: #ffffff, background color: #999999, font size: 10.5pt, font weight: normal)"
html
:
"↵tertiary-button-disabled↵"

impact:"critical"

The spec (as well as The Melanie) agree!

1.4.3 Contrast (Minimum): The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following:

  • Incidental: Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.

https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html

With the latest version of the addon, this no longer throws. This appears to have been an issue in axe itself.