WP_Links_List_Table::get_primary_column_aria_label( object $link ): string

Returns a clean label for the primary (Name) column’s row header aria-label.

Description

Provides screen readers with just the link name as the row header name, preventing them from computing the name from the full cell content.

Parameters

$linkobjectrequired
The current link object.

Return

string The link name.

Source

protected function get_primary_column_aria_label( $link ) {
	$link_name = html_entity_decode( $link->link_name, ENT_QUOTES, get_bloginfo( 'charset' ) );
	$link_name = wp_strip_all_tags( $link_name );

	return $link_name;
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.