I've implemented a fixed header in the Divi theme on WordPress and given the content padding to move it out from under the header. To compensate for the fixed header overlapping in-page anchors I've added fake anchor points offset a certain number of pixels above the actual anchor text. (I tried the :before element solution, scroll-padding-top
, and a few other fixes but they didn't work in Divi). So far so good.
The problem is that when a screen reader (for example, JAWS) reads the screen, it scrolls down the page. For people who are partially sighted (as opposed to blind), it's important that what's being read matches up with what's on the screen. However, what is read out by JAWS on my site is often obscured by the fixed header.
Has anyone found a solution to this?
Here's my (simplified) code...
.content {
padding-top: 100px;
}
.fake_anchor_section {
margin: -100px 0 100px;
}
<div class="content">
<a href="#example">Jump to example</a>
....
<div id="example" class="fake_anchor_section"></div>
<div>Real anchor section contents</div>
<div>