Applied Accessibility -11 Improve Readability with High Contrast Text

 Improve Readability with High Contrast Text



Low contrast between the foreground and background colors can make text difficult to read. Sufficient contrast improves the readability of your content, but what exactly does "sufficient" mean?


The Web Content Accessibility Guidelines (WCAG) recommend at least a 4.5 to 1 contrast ratio for normal text. The ratio is calculated by comparing the relative luminance values of two colors. This ranges from 1:1 for the same color, or no contrast, to 21:1 for white against black, the strongest contrast. There are many contrast checking tools available online that calculate this ratio for you.

like this one or this  


Avoid Colorblindness Issues by Using Sufficient Contrast

Colorblind users have trouble distinguishing some colors from others - usually in hue but sometimes lightness as well

The WCAG-recommended contrast ratio of 4.5:1 applies for color use as well as gray-scale combinations.

in practice, the 4.5:1 ratio can be reached by darkening the darker color and lightening the lighter one with the aid of a color contrast checker. Darker colors on the color wheel are considered to be blues, violets, magentas, and reds, whereas lighter colors are oranges, yellows, greens, and blue-greens.


you can easily adjust the lightness of the colors since he declared them using the CSS hsl() property (which stands for hue, saturation, lightness) by changing the third argument. Increase the background-color lightness value and decrease the color lightness value .This improves the contrast 


 most common form of Colorblindness is a reduced sensitivity to detect greens.
For example, if two similar green colors are the foreground and background color of your content, a colorblind user may not be able to distinguish them. 

Close colors can be thought of as neighbors on the color wheel, and those combinations should be avoided when conveying important information.


like this example

Danger!



Here is the html code for it


<head>
  <style>
  button {
    color: #33FF33;
    background-color: #FFFF33;
    font-size: 14px;
    padding: 10px;
  }
  </style>
</head>
<body>
  <header>
    <h1>Danger!</h1>
  </header>
  <button>Delete Internet</button>
</body>

source

Comments

Popular posts from this blog

ES6 : 5 Prevent Object Mutation

ES6: 1 Explore Differences Between the var and let Keywords

CSS Grid: Reduce Repetition Using the repeat Function