Interactive UI elements must have a contrast ratio of at least 3:1
against their background in all states.
Insufficient button contrast:
This button has insufficient contrast ratio (1:1) against its
background, making it difficult to distinguish as an interactive
element:
Note: Possible to automatically test. This violation can be detected by
querying all controls/interactive elements (e.g., buttons),
programmatically retrieving their
color attributes (e.g., from the
CSS stylesheet), along with the
background-color attributes of their
background elements, and verifying that an appropriate contrast ratio
exists between them.
If the color of an element or the
background-color of the parent element cannot
be determined, a human tester or AI is required to visually check the
contrast ratio of an input element against its background.