-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
add a11y information for contrast ratio in background-images and fix issue in the example #33190
Conversation
Preview URLs External URLs (3)URL:
(comment last updated: 2024-05-22 09:12:42) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for a super-useful update, @glmvc!
I have left a few suggestions for you to consider, but this is mostly looking good.
@@ -83,8 +91,10 @@ Note that the star image is partially transparent and is layered over the cat im | |||
|
|||
```css | |||
p { | |||
font-weight: bold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still difficult to read. I think white text with a black text shadow (I used text-shadow: 0.07em 0.07em 0.05em black;
) is more legible
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks again @glmvc, and apologies for taking so long to respond to this.
Note: I made a couple of changes to the example text color and shadow as I felt it was still pretty hard to read.
Description
On the reference page for the
background-image
CSS property, there is an example "Layering background images" where the text is hard to read because of the background images.On other pages, such as
background-color
, there is information about contrast ratio (Accessibility concerns).I've added that information for
background-image
as well, and fixed the contrast ratio issue in the example below.Motivation
Such aspects should be stated and applied consistently.
Additional details
/
Related issues and pull requests