"Learn Accessibility by Building a Quiz" Project

Tell us what’s happening:
I need to do the following task:

On the topic of visual accessibility, contrast between elements is a key factor. For example, the contrast between the text and the background of a heading should be at least 4.5:1.

Change the font color of all the anchor elements within the list elements to something with a contrast ratio of at least 7:1.

I have tried this:
nav>ul>li>a {

aspect-ratio:7:1

nav>ul>li>a {

contrast-ratio:7:1

}

I’m not sure what to do about this. Please help and thank you.

The CSS aspect-ratio isn’t for colors, it’s for width/height dimensions. And I don’t think there is a contrast-ratio CSS property.

The CSS property that sets the text color is just the color property. You need to choose a color that has at least a 7 to 1 contrast ratio. I don’t know which step this is but I seem to recall that the hint might give you a color to use?

1 Like

I just tried white color and it works

1 Like
li > a {
	color: #fff;
}
9 Likes

thanks for the solution, been stuck on that

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.