Troubleshooting 'Elements with visible text labels do not have matching accessible names' in GeneratePress
Content
If you've recently run a Google PageSpeed Insights test on your GeneratePress website, you might have encountered the accessibility warning: 'Elements with visible text labels do not have matching accessible names.' This is a common issue that has been reported by multiple users, particularly affecting the 'Read More' button links on archive pages and homepages.
What Does This Error Mean?
This warning is an accessibility (a11y) issue. Screen readers and other assistive technologies rely on proper HTML markup to interpret and announce elements to users. The error occurs when a visible text label (like the words 'Read More') does not match the non-visible aria-label attribute that describes the element's purpose to assistive tools. This creates a confusing experience for users who rely on them.
Why This Happens in GeneratePress
This is a known issue that was introduced in a specific version of the GeneratePress theme. The development team is actively discussing and working on a permanent fix for this in the theme's core code. You can follow the progress of this issue on the official GeneratePress GitHub repository.
How to Fix It: A Temporary CSS Solution
While waiting for an official theme update, you can apply a simple code snippet to resolve the warning. This fix specifically targets the 'Read More' link's aria-label to ensure it matches the visible text.
- In your WordPress dashboard, navigate to Appearance > Customize.
- Open the Additional CSS panel.
- Copy and paste the following code snippet:
a.more-link {
aria-label: 'Read more';
}
- Publish the changes.
This CSS rule explicitly sets the accessible name for the 'Read More' link, bringing it into compliance with accessibility guidelines and eliminating the PageSpeed warning.
Other Common Causes and Solutions
While the 'Read More' link is a frequent culprit, this warning can apply to any element. If the above solution doesn't resolve your issue, consider these other troubleshooting steps:
- Plugin Conflict: A third-party plugin might be modifying elements and creating the mismatch. Temporarily disable all plugins to see if the warning disappears. If it does, reactivate them one by one to identify the conflicting plugin.
- Custom Code: Review any custom functions or HTML you have added to your site. Ensure that any buttons or links with visible text also have a matching
aria-labelattribute. - Page Builder Elements: If you use a page builder like Elementor, check its elements (especially buttons) for accessibility settings where you can manually add an appropriate
aria-label.
Final Thoughts
Addressing accessibility warnings like this is not just about improving a PageSpeed score; it's crucial for creating an inclusive web experience for all visitors. The fix for this specific GeneratePress issue is straightforward and can be implemented immediately while the theme's developers work on a permanent solution.
Related Support Threads Support
-
Website Issuehttps://wordpress.org/support/topic/website-issue-13/
-
Auto Scrollinghttps://wordpress.org/support/topic/auto-scrolling-2/
-
Numbers showing in the top left on every pagehttps://wordpress.org/support/topic/numbers-showing-in-the-top-left-on-every-page/
-
[aria-*] attributes do not match their roleshttps://wordpress.org/support/topic/aria-attributes-do-not-match-their-roles-6/
-
Javascript Issue under Customize Pagehttps://wordpress.org/support/topic/javascript-issue-under-customize-page/
-
Suddenly categories not working/showing correctlyhttps://wordpress.org/support/topic/suddenly-categories-not-working-showing-correctly/
-
HTML + js script displaying below page contenthttps://wordpress.org/support/topic/html-js-script-displaying-below-page-content/
-
Second page of product catalogue not workinghttps://wordpress.org/support/topic/second-page-of-product-catalogue-not-working/
-
There is an issue with the Read Me button link at the top right of your Imprinthttps://wordpress.org/support/topic/there-is-an-issue-with-the-read-me-button-link-at-the-top-right-of-your-imprint/
-
My Homepage CSS is not working Finehttps://wordpress.org/support/topic/my-homepage-css-is-not-working-fine/
-
Regarding pageinsightshttps://wordpress.org/support/topic/regarding-pageinsights/
-
Text to small to read & Clickable elements too close togetherhttps://wordpress.org/support/topic/text-to-small-to-read-clickable-elements-too-close-together/
-
Text too small to readhttps://wordpress.org/support/topic/text-too-small-to-read-7/
-
skip to content and page break issuehttps://wordpress.org/support/topic/skip-to-content-and-page-break-issue/
-
Help me with this issue pleasehttps://wordpress.org/support/topic/help-me-with-this-issue-please/
-
i want fixt this problemhttps://wordpress.org/support/topic/i-want-fixt-this-problem/
-
a site for the sale of drugs, cocaine, heroin and others has been created on youhttps://wordpress.org/support/topic/a-site-for-the-sale-of-drugs-cocaine-heroin-and-others-has-been-created-on-you/
-
Mobile Usability Problemshttps://wordpress.org/support/topic/mobile-usability-problems/
-
website scroll bar is slow and sometimes stops workinghttps://wordpress.org/support/topic/website-scroll-bar-is-slow-and-sometimes-stops-working/
-
Arrow for displaying sub-menu duplicating many timeshttps://wordpress.org/support/topic/arrow-for-displaying-sub-menu-duplicating-many-times/
-
Error – Jittery heading when transitioning to sticky navhttps://wordpress.org/support/topic/error-jittery-heading-when-transitioning-to-sticky-nav/
-
My site sometimes doesn’t load completelyhttps://wordpress.org/support/topic/my-site-sometimes-doesnt-load-completely/
-
attributes do not match their roles (tabs)https://wordpress.org/support/topic/attributes-do-not-match-their-roles-tabs/
-
Global element Glitchhttps://wordpress.org/support/topic/global-element-glitch/
-
unknown text on top of pageshttps://wordpress.org/support/topic/unknown-text-on-top-of-pages/
-
Google auto ads not working properlyhttps://wordpress.org/support/topic/google-auto-ads-not-working-properly/
-
Elements with visible text labels do not have matching accessible names.https://wordpress.org/support/topic/elements-with-visible-text-labels-do-not-have-matching-accessible-names-3/
-
Website breaks when removing some elementshttps://wordpress.org/support/topic/website-breaks-when-removing-some-elements/
-
Regex Code Problem.https://wordpress.org/support/topic/regex-code-problem/
-
Filter Issuehttps://wordpress.org/support/topic/filter-issue-13/
-
Warning! low text-HTML ratiohttps://wordpress.org/support/topic/warning-low-text-html-ratio/
-
Website issuehttps://wordpress.org/support/topic/website-issue-12/
-
H1 is missing in auther box headinghttps://wordpress.org/support/topic/h1-is-missing-in-auther-box-heading/
-
Button blockshttps://wordpress.org/support/topic/button-blocks/
-
The page does not load normally.https://wordpress.org/support/topic/the-page-does-not-load-normally/
-
Elements with visible text labels do not have matching accessible names.https://wordpress.org/support/topic/elements-with-visible-text-labels-do-not-have-matching-accessible-names-4/