Re: Call for Review: WCAG 2.0 Techniques Draft Updates

C7: Using CSS to hide a portion of the link text <http://www.w3.org/WAI/GL/2016/WD-WCAG20-TECHS-20160105/complete-diff.html#C7> contains the following CSS to visually hide an element:

> a span {
>     height: 1px;
>     width: 1px;
>     position: absolute;
>     overflow: hidden;
>     top: -10px;
> }


Is there any reason to include the negative top value? If top, right, bottom, and left are not set, the element will stay in the rendered place. This would prevent any mess-ups with—for example—focus styles. A way around this would be to set position to relative on the parent element, but that means extra code that isn’t strictly necessary if top wasn’t set.

—Michiel

Received on Friday, 8 January 2016 16:35:54 UTC