Specificity is an algorithm used by browsers to determine the CSS declaration that is the most relevant to an element to determine the property value to apply to the element. The algorithm calculates the weight of a CSS selector to determine which rule gets applied to an element. The algorithm is a three-column value that is ranked in the order of ID, class, and type -- corresponding to the three types of selectors. The columns are created by counting the number of selector components for each selector weight category in the selectors that match the element.
Contrast ratios determine the legibility of the content on your website. The contrast is between the background and foreground content (usually text). There are two different ratio ratings (AA & AAA), with minimums set depending on if it is body text, large-scale text, or icons and graphs.
Meeting guidelines for contrast ratios benefits all users, but is especially helpful to users with certain types of color blindness and other similar conditions. Additionally, not meeting these accessibility guidelines could result in a lawsuit.
The Web Accessibility Initiative (WAI) sets accessibility rules for the W3C.
Specificity is an algorithm used by browsers to determine which CSS delcaration will be applied to an element. It is a three-column value determined by the weight of the selectors. Link pseudo classes should be styled in the LVHFA order (Link, Visited, However, Focus, Active) because it is the order in which the CSS rules will work consistently. In addition to everything covered so far in this research document, there are ways to check the contrast ratio of text using the browsers developer tools. I use Firefox as my web browser, and I found an extension you can add on to your browser called the WCAG Contrast Checker, which calculates the level of contrast ratio (AA or AAA) between your background and text.