Whether the button has focus or hovered or not, the text on the button must have a sufficient contrast with its background color.
- Do hover colors need to be accessible?
- Is hover good for accessibility?
- What should contrast be for accessibility?
- Why is color contrast important for accessibility?
Do hover colors need to be accessible?
Hover effects don't necessarily make your website less accessible, provided that you follow the requirements in the Web Content Accessibility Guidelines (WCAG), which are widely considered the standards for digital accessibility.
Is hover good for accessibility?
Use best practices to make hover and focus more predictable and less likely to cause errors. This is especially accessible for people with physical and visual disabilities. Blind and visually impaired people use screen readers to interact with websites and apps.
What should contrast be for accessibility?
Color contrast is the difference in brightness between foreground and background colors. For accessibility purposes, aim for a 4.5:1 ratio between the foreground color (e.g. text, links, etc.) and the background color. This ratio ensures people with moderately low vision can tell the colors apart and see your content.
Why is color contrast important for accessibility?
Color contrast is important because text and background colors can determine how people interact with the content that is written in those colors. Low contrast colors are difficult to read when text contrasts poorly with background colors, while high-contrast colors are easier to read when paired together.