Why are these 2 links present on my frontend page? What are they and how can I remove them? They show up on the frontend before all the CSS and JS is loaded, which in my case it’s loaded on User Interaction so they are visible until a mouse moves or touch on smartphones.
Here is the HTML code of the links in question which shows up right after the <body> element in my frontend HTML:
<a class="skip-link" href="#bricks-content-wrapper" aria-label="Skip to main content">Skip to main content</a> <a class="skip-link" href="#bricks-footer-wrapper" aria-label="Skip to footer">Skip to footer</a>
They are suppose to not show unless you press the tab key, but unfortunately I do see that in your site they appear due to the way you setup the CSS load.
As a quick workaround, please add the following snippet to your child theme in order to avoid rendering the skip links:
<?php
// Do not render skip links
add_action('init', function() {
remove_action( 'bricks_body', [Bricks\Theme::instance()->frontend, 'add_skip_link'] );
});
We’ll probably add a setting to Bricks settings on coming release.
The “Skip to main content” isn’t visible by default, but it will peek through above the navigation with Safari’s bouncy scroll animations when reaching the very top of the page.
My main concern with this is that the element seems to get inserted BEFORE the header instead of AFTER the header. Doesn’t this defeat the whole purpose of skipping to main content? Absolutely nothing will be skipped this way. The header is sticky and created using the header template in bricks.
With this implementation I can very well deactivate it using the script above. But I’d love to actually support this accessibility feature.
Thanks for pointing out the settings option – I wasn’t aware!
However, I’ll try to move it off screen visually like you recommended to keep the functionality. Might also be a thing that could probably be done by default I guess. By default the skip-link class already has a negative y-axis transform of -102% that will be removed on focus to bring it into view for screenreaders:
Instead of using the “top” position, I’d recommend increasing the existing translateY to 200% or even more. This will preserve the screenreader focus functionality:
Since Safari is the only browser with bouncy-scroll feature (as far as I know) and currently only has a market share of about 8.87%, you might not want to take it as a basis for default values. But hey, the fix is easily implemented
This is still appearing on Safari on 2025 with bouncy-scroll.
Not sure what is the purpose of those buttons there, but shouldn’t be more clean to disable this feature by default and give an option on settings for those who really need it?
I’m seeing the skip links on iOS Chrome having scrolled the page down (which hides the address bar) then quickly swiping back to the top. Should be fixed out of the box IMO.
Thanks for the link via DM. I can see the issue after some back-and-forth. As an intermediate fix,
add this to Bricks » Settings » Custom Code » Custom CSS: