Do you think you may need to use our automated fix to remove unnecessary title attributes in WordPress? This article explains how to easily remove title attributes on your WordPress site for improved accessibility.
How to Remove Title Attributes in WordPress
If your website has unnecessary title
attributes on links, buttons, images or other elements, this can be, at best, annoying and, at worst, confusing for screen reader users. WordPress coding standards recommend against the use of title attributes. Removing these can be easily done without writing code using the WordPress Accessibility Checker plugin.
Step 1
Click into the Accessibility Checker plugin settings in your WordPress dashboard (you must be logged in with an administrator account to access these settings).
Step 2
Go to the “Fixes” tab in the Settings Tabs navigation.
Step 3
Check the box for Remove Title Attributes, then scroll to the bottom of the page and click the “Save Changes” button.
Note: Automated accessibility fixes use JavaScript or other methods to modify how your website functions. Occasionally, a WordPress theme or extension may conflict with or prevent our fixes from working as expected. We recommend testing these fixes on a local or staging copy of your website first.
Not seeing the fix?
The Remove Title Attributes accessibility fix should start working immediately; however, if you don’t see the fix, it could be because you’re seeing a cached version of your website. Try clearing the cache in any caching plugins and on your hosting account, then look at your site in an incognito window to confirm the fix worked.
Note: Turning on a fix will not instantly remove related issues from Accessibility Checker reports. After turning on a fix, you can clear issues from reports by running a full site scan in Accessi
What This Fix Does
When enabled, the Remove Title Attributes fix scans your website for elements with a title attribute and checks if there’s a more accessible attribute available to name that element for screen reader users.
If a better attribute is found, the title attribute is removed. If none exists, the information from the title attribute is transferred to the first available preferred attribute, maintaining the element’s accessibility.
Here’s how it works based on different types of elements.
For images:
- If an
alt
attribute is present, the title attribute is removed. - If no
alt
exists, the content from the title attribute is moved to thealt
attribute.
For links and buttons:
- The fix checks for
aria-label
oraria-labelledby
. If either is present, the title attribute is removed. - If neither is found, the title content is transferred to an
aria-label
.
For Form Elements (inputs, textareas, selects, and buttons):
The fix looks for aria-label
, aria-labelledby
, a label element associated with the form field (using the for
attribute), or a wrapping label element. If one is found, the title is removed or moved accordingly.
Impact on Accessibility
The title
attribute is often overused or used incorrectly, which can lead to accessibility issues. Screen readers may not always prioritize title
attributes, and in some cases, they may confuse or distract users if better attributes, like alt
or aria-label
, are available.
By replacing or removing the title
attribute in favor of more accessible alternatives, this feature ensures that assistive technologies can correctly interpret the purpose of elements on your site. This improves the overall user experience for individuals relying on screen readers or other assistive devices, ensuring that they receive the most relevant and helpful information.