Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce text color on inline boundaries to ensure contrast #10623

Merged

Conversation

chrisvanpatten
Copy link
Member

Fixes #9508.

This PR ensures active/focussed inline boundaries have a text color to prevent color contrast issues.

inline-boundaries

I also lightly refactored the text inline boundaries to consolidate some CSS.

@chrisvanpatten chrisvanpatten added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Oct 15, 2018
@chrisvanpatten chrisvanpatten added the Needs Design Feedback Needs general design feedback. label Oct 15, 2018
@tofumatt
Copy link
Member

OMG you are the best.

Copy link
Member

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinged @karmatosed or @sarahmonster for a review that this is alright–the concept we totally should do, but if you have specific design thoughts that won't require too much extra complexity let us know! 😄

// Link inline boundaries get special colors.
a[data-mce-selected] {
box-shadow: 0 0 0 1px $blue-medium-100;
background: $blue-medium-100;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there sufficient colour contrast here? To my eyes it's fine, but then I have good eyesight and am right now using my 5K monitor 🤷‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch; updated this to $blue-medium-900 to achieve WCAG AA compatibility.

@tofumatt tofumatt added this to the 4.1 - UI freeze milestone Oct 15, 2018
Copy link
Member

@karmatosed karmatosed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: Thanks for this!

@karmatosed karmatosed removed the Needs Design Feedback Needs general design feedback. label Oct 15, 2018
@tofumatt tofumatt removed the request for review from sarahmonster October 15, 2018 17:36
@chrisvanpatten chrisvanpatten merged commit c0f87a2 into WordPress:master Oct 15, 2018
@chrisvanpatten chrisvanpatten deleted the fix/inline-boundary-color-contrast branch October 15, 2018 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants