03 Research and Documentation CSS Specificity

Link back to Main Page

CSS Specificity and A11Y

CSS Specificity and the LVHFA system is vital to the understanding of CSS, because this order determines what styling actually comes first in priority. The styling present in the first pseudo-class, Link, will not be present if there is a similar styling in Viewed or Hover. Hover will not be present if there is a similar styling in Focus or Active, etc.

Contrast Ratios

Contrast Ratios are one of the most important parts of Accessibility, or A11y. Contrast ratios are a measure of the difference in visual contrast between the text or content within elements and their background. The exact ratio, such as 3:1 or 4.5:1, where the first number represents the brightness of the text or content, and the second number represents the brightness of the background. The higher the ratio, the better the contrast.

The Importance of Contrast

So why are Contrast Ratios so important? Because not everyone has the same capability to see as others. Contrast ratios ensure that everyone can see the same thing, including those that are visually impaired, like people who are colorblind. Meeting the contrast ratio guidelines helps make web content more accessible to individuals with varying levels of vision and ensures that links and buttons are easily visible and usable by a broader audience.

The Web Accessibility Initiative

The Web Accessibility Initiative or WAI, Is the group at the World Wide Web Consortium (W3C) that actually determines the Accessibility rules and guidelines and ensure that these rules match what is necessary for those with disabilities. It is composed of representatives from various corporations, industries, governments, and other groups of interest. These guidelines are referred to as WCAG, Web Content Accessibility Guidelines, and cover a wide range of topics. All these topics are what is necessary to ensure a site is fully accessible.

Summary

In Summary, we talkd about Specificity and the order of link psuedo-classes, LVHFA. We talkd about Contrast Ratios and the system for determining them properly. We talked about why the contrast ratios are important for Accessibility, or A11Y, and we talked about the WAI, who sets the rules for Accessibility.