-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Contrast checker for pseudo-state colors #78305
Copy link
Copy link
Open
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.

Description
#76491 added support for styling blocks per interactive pseudo-state, which is amazing! Custom colors can be assigned for
:hover,:focus,:focus-visible, and:activeon blocks that support it (for example, the button block)/However, the contrast checker is not triggered when picking colors for those states, so accessibility issues can be introduced silently without the site admin being notified.
Proposed solution
The contrast checker should run on all pseudo-state color panels, taking into account any colors inherited from the default state when the pseudo-state doesn't define them explicitly. The checker should also avoid showing false warnings when the user physically hovers the block in the canvas while editing the default state.
Steps to reproduce
:hoverstate