WP_Links_List_Table::get_primary_column_aria_label
Returns a clean label for the primary (Name) column's row header aria-label.
Provides screen readers with just the link name as the row header name, preventing them from computing the name from the full cell content.
Method of the class: WP_Links_List_Table{}
No Hooks.
Returns
string. The link name.
Usage
// protected - for code of main (parent) or child class $result = $this->get_primary_column_aria_label( $link );
- $link(object) (required)
- The current link object.
Changelog
| Since 7.1.0 | Introduced. |
WP_Links_List_Table::get_primary_column_aria_label() WP Links List Table::get primary column aria label code WP 7.1
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;
}