02 Research and Documentation   3R Specificity A11Y


Explain CSS Specificity

Specificity is calculated by an algorithm that assigns a specific value (or weight) to any given CSS declaration. The weight is determined by the number of selectors from each weight category are in an element. If there are more than 1 declarations trying to assign different values to same element the one with the higher weight wins and that gets applied.
The selector weight categories are as follows:

Because the pseudo-classes all get the same weight 0-1-0 it means that the last one listed for an element is the one that will get applied. So order is important if you want your links to behave properly. LVHFA just ask the Ewoks!

Explain Contrast Ratios

According to The Bureau of Internet Accessibility "Contrast is a ratio of the luminance of the brightest color to the darkest color that a system can produce. Contrast ratios range from 1 to 21 (written as 1:1 and 21:1). The first number, L1, refers to the relative luminance of light colors while L2 is the second number that refers to the relative luminance of dark colors. The W3c says that a contrast ration of 3:1 is the minimum recommended level for standard text and vision. For a person with 20/40 vision that minimum bumps up to 4.5:1. At 20/80 it goes all the way to up to 7:1. The 4.5:1 ratio was decided upon because the common vision acuity of elders around 80 is commonly reported at 20/40.

Explain Why We Meet Contrast Ratios?

Meeting contrast ratios is important for multiple reasons:

  1. As Robert Bucholz says it's important just because it's the right thing to do morally and ethically.
  2. Another reason that we must meet contrast ratios is because it's the right thing to do fiscally. The more people that can access your site the better it is for your bottom line.
  3. The last reason is that it's the right thing to do legally. Failure to meet the ADA accessibility requirements could cause law suits that would be expensive, and irresponsible because they are so easily avoided.

Who Sets Accessibility Rules

The WCAG is developed by the Accessibility Guidelines Working Group or AG WG. Which is part of the W3C or World Wide Web Consortium

Summary

Specificity is an important concept to understand and can really help troubleshoot styling issues that can be encountered (I've already run into them).
WAG are important considerations to keep in mind for multiple reasons not the least of which is the potential of legal ramifications for not making your site accessible.