Title: WP_MS_Sites_List_Table::get_primary_column_aria_label
Published: August 20, 2026

---

# WP_MS_Sites_List_Table::get_primary_column_aria_label( array $blog ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#wp--skip-link--target)

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

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#description)󠁿

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#parameters)󠁿

 `$blog`arrayrequired

The current site properties array.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#return)󠁿

 string The site title, or the site URL (domain + path) if the title is empty.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#source)󠁿

    ```php
    protected function get_primary_column_aria_label( $blog ) {
    	$blog_name = html_entity_decode( (string) get_blog_option( $blog['blog_id'], 'blogname', '' ), ENT_QUOTES, get_bloginfo( 'charset' ) );
    	$blog_name = wp_strip_all_tags( $blog_name );

    	// Fall back to the blog URL and path if the blog name is empty.
    	return '' !== $blog_name ? $blog_name : untrailingslashit( $blog['domain'] . $blog['path'] );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-ms-sites-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/class-wp-ms-sites-list-table.php#L899)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-ms-sites-list-table.php#L899-L905)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_strip_all_tags()](https://developer.wordpress.org/reference/functions/wp_strip_all_tags/)`wp-includes/formatting.php` |

Properly strips all HTML tags including ‘script’ and ‘style’.

  | 
| [untrailingslashit()](https://developer.wordpress.org/reference/functions/untrailingslashit/)`wp-includes/formatting.php` |

Removes trailing forward slashes and backslashes if they exist.

  | 
| [get_blog_option()](https://developer.wordpress.org/reference/functions/get_blog_option/)`wp-includes/ms-blogs.php` |

Retrieves option value for a given blog id based on name of option.

  | 
| [get_bloginfo()](https://developer.wordpress.org/reference/functions/get_bloginfo/)`wp-includes/general-template.php` |

Retrieves information about the current site.

  |

[Show 1 more](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/get_primary_column_aria_label/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_ms_sites_list_table%2Fget_primary_column_aria_label%2F)
before being able to contribute a note or feedback.