WP_Terms_List_Table::get_primary_column_aria_label( WP_Term $term ): string

In this article

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

Description

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

Parameters

$termWP_Termrequired
Term object.

Return

string The term name.

Source

protected function get_primary_column_aria_label( $term ) {
	// Term names are already sanitized via `sanitize_term()` on creation and update.
	return $term->name;
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

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