Skip to content
WordPress Core

WordPress 7.0 Removes Title Attributes from Author Link Functions

WordPress 7.0 removes default title attributes from author link functions to simplify markup and improve accessibility, offering developers new parameters and filters for customization.

WordPress 7.0 Removes Title Attributes from Author Link Functions

WordPress 7.0 introduces a notable change to how author-related links handle title attributes, aiming to simplify and modernize link markup. This update removes or facilitates the removal of title attributes from links related to post authors, including author websites and posts archive links.

Key Takeaways

  • WordPress 7.0 removes title attributes from author link functions by default, reducing redundant HTML tooltips.
  • Functions get_the_author_link() and the_author_link() gain a new $use_title_attr parameter to optionally disable title attributes.
  • The “Posts by Author” title attribute is removed from author archive links but remains accessible via hooks for customization.
  • Developers can customize author post links text through the the_author_posts_link filter, which now supplies title and author parameters.
  • This change aligns with modern accessibility and UX standards by avoiding unnecessary tooltips on author links.

For many years, WordPress author link functions have included title attributes on anchor tags, such as title="Visit Author’s website" or title="Posts by Author". These attributes typically provide tooltips on mouse hover, offering additional context about the link destination. However, in practice, these tooltips have become less essential and can clutter the user experience, especially on modern browsers and assistive technologies.

Title attributes on links can also present accessibility challenges. Screen readers may redundantly announce title text already conveyed by link text or surrounding context, causing confusion. Consequently, web accessibility guidelines generally recommend avoiding unnecessary title attributes when the link text is descriptive enough.

Changes Introduced in WordPress 7.0

WordPress 7.0 revises core author link functions to remove or allow removal of title attributes. The key changes include:

New Parameter for Author Website Links

The functions get_the_author_link() and the_author_link() now feature a new boolean parameter $use_title_attr. By default, it is true, preserving the previous behavior of including the title attribute. When set to false, the functions output anchor tags without the title attribute.

For example, the default output remains:

<a href="https://author.example.com" title="Visit Author’s website" rel="author external">Author</a>

When disabling the title attribute with the_author_link(false);, the output becomes:

<a href="https://author.example.com" rel="author external">Author</a>

Author Posts Archive Link

The author posts archive link generated by the_author_posts_link() and get_the_author_posts_link() no longer includes the title="Posts by Author" attribute by default in WordPress 7.0:

<a href="https://example.org/author/author/" rel="author">Author</a>

Despite removing the title attribute, the original title text remains accessible within the the_author_posts_link filter as a parameter, allowing developers to customize the link text or reintroduce title attributes if needed.

wp_list_authors() Output

The wp_list_authors() function, which lists authors with links, now outputs links without any title attributes by default. This streamlines the HTML and avoids redundant tooltips on author lists.

Technical Implications for Developers

This update simplifies author link markup and offers improved control over title attributes. For developers maintaining themes or plugins that rely on author links, the new $use_title_attr parameter is critical for controlling tooltip display.

Developers can also leverage the enhanced the_author_posts_link filter, which now passes the author’s display name and original title text as arguments. This enables precise customization of link content, such as replacing the author’s name with “Posts by Author” or other localized strings, without relying on title attributes.

function wpdocs_author_posts_link( $link, $author = '', $title = '' ) {
    if ( '' !== $title && '' !== $author ) {
        $link = str_replace( '>' . $author . '', '>' . esc_html( $title ) . '', $link );
    }
    return $link;
}
add_filter( 'the_author_posts_link', 'wpdocs_author_posts_link', 10, 3 );

This filter example shows how to replace the author name with the title text inside the link, enhancing flexibility while adhering to accessibility best practices.

Context Within WordPress Core Development

This change is part of a broader effort in WordPress core to modernize HTML output and improve accessibility. The removal of unnecessary title attributes aligns with web standards and user experience improvements seen in recent WordPress releases.

It also reflects community feedback emphasizing simpler, cleaner markup without sacrificing semantic meaning. By preserving backward compatibility through optional parameters and filters, WordPress core balances innovation with developer needs.

For context, our previous coverage of WordPress core updates highlights similar efforts to refine output markup and improve internationalization support.

What This Means for WordPress Users

Site owners and developers should verify how their themes and plugins generate author links in WordPress 7.0. Since the default behavior changes for author post archive links and author site URLs, tooltips previously visible on links will no longer appear unless explicitly added back.

For most sites, this results in cleaner HTML and a better user experience, particularly on mobile devices where tooltips are less effective. However, if your theme or plugin relies on those title attributes for user guidance, you will need to update code to restore or replace that functionality using the new parameters or filters.

Agencies and freelancers maintaining client sites should audit author-related links to ensure accessibility and usability remain intact. Testing with screen readers and keyboard navigation will help confirm that removing title attributes does not degrade navigation clarity.

This change also signals WordPress’s continued commitment to accessibility and semantic correctness, a trend site operators can expect to see further in upcoming releases. Staying current with core updates ensures compatibility and the best possible experience for end users.

Frequently Asked Questions

Why did WordPress remove title attributes from author links?

Title attributes often provide redundant or unhelpful tooltips that can clutter user experience and cause accessibility issues. Removing them aligns with modern web standards and improves overall usability.

How can I re-enable title attributes on author links if needed?

For author website links, set the $use_title_attr parameter to true in get_the_author_link() or the_author_link(). For author posts links, use the the_author_posts_link filter to add custom title attributes or modify link text.

Will this change affect SEO or link semantics?

Removing title attributes does not affect the core semantics of author links, which rely on the rel="author" attribute and link text. SEO impact is minimal, and the change enhances semantic clarity.

Are there any accessibility benefits from this update?

Yes, avoiding unnecessary title attributes reduces confusion for screen reader users and improves the overall navigation experience by eliminating redundant announcements.

Related News