CJSCommonPlatform / govuk_single_page_pdk

Single Page Platform Development Kit
http://cjscommonplatform.github.io/govuk_single_page_pdk/
13 stars 20 forks source link

Accessibility: usage of "visuallyhidden" CSS class results in a pa11y warning #105

Closed K-T-O closed 7 years ago

K-T-O commented 7 years ago

Pa11y warns about the following issue:

Warning: This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least 4.5:1.

Which I guess does not make much sense but occurs due to:

@gov.uk/platform-template/lib/govuk_template/stylesheets/_accessibility.scss

/* Hide only visually, but have it available for screenreaders */ .visually-hidden, .visuallyhidden { position: absolute; left: -9999em;

fabiotisci commented 7 years ago

this way of doing this comes from GDS so UX is aware of it.