Add WordPress's standard .screen-reader-text class for themes that are missing it, so hidden labels stay hidden visually but are still read out.
.screen-reader-text {
border: 0;
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
}
.screen-reader-text:focus {
background-color: #fff;
clip-path: none;
color: #1d2327;
display: block;
font-size: 0.875rem;
font-weight: 600;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000;
}
WordPress, plugins and many snippets use the screen-reader-text class for text only screen readers should hear, like “(opens in a new tab)” or form labels. If your theme doesn’t define it, that text shows on screen. This CSS adds the standard version.
The first rule hides the element visually by shrinking it to 1 pixel and clipping it, without display: none, which would hide it from screen readers too.
The second rule shows the element when it receives keyboard focus. That matters for skip links, which should appear when a keyboard user tabs to them.
.screen-reader-text first.Add <span class="screen-reader-text">Hidden</span> to a post. It shouldn’t be visible, but a screen reader should read it.