All WordPress .assistive-text and .screen-reader-text are being hidden superficially — screen readers would still be able to read them.
Here’s the CSS snippet from HTML5 Boilerplate v4.0:
.visuallyhidden { border:0; clip:rect(0 0 0 0); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; }
—
By the way, I would write a separate post here how I write the class or ID name of an HTML element rather than placing the pre-defined class selector in the HTML code. For example, instead of putting .visuallyhidden in all elements that I want to be displayed according to the style, I would put its class or ID name along with .visuallyhidden in the stylesheet.
Leave a Reply