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

---

# WP_Media_List_Table::get_primary_column_aria_label( WP_Post $post ): string

## In this article

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

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

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

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

Provides screen readers with just the attachment 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_media_list_table/get_primary_column_aria_label/?output_format=md#parameters)󠁿

 `$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)required

The current [WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
object.

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

 string The attachment title.

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

    ```php
    protected function get_primary_column_aria_label( $post ) {
    	// The title may contain HTML. The printed aria-label uses esc_attr() later.
    	$attachment_title = html_entity_decode( _draft_or_post_title( $post ), ENT_QUOTES, get_bloginfo( 'charset' ) );
    	$attachment_title = wp_strip_all_tags( $attachment_title );

    	return $attachment_title;
    }
    ```

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

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

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

Gets the post title.

  | 
| [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’.

  | 
| [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_media_list_table/get_primary_column_aria_label/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_media_list_table/get_primary_column_aria_label/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_media_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_media_list_table%2Fget_primary_column_aria_label%2F)
before being able to contribute a note or feedback.