Skip to content

Commit fbff6cc

Browse files
author
Dion Hulse
committed
Users: Add id="user-{ID}" to rows on WP_MS_Users_List_Table.
Brings the network Users list in line with `WP_Users_List_Table::single_row()`, which has always emitted `<tr id="user-{ID}">`. Without a row id, plugin and assistive-tech code that targets specific rows has to fall back to walking from the bulk-action checkbox (`#blog_{ID}`) up via `.closest('tr')`. Additive: existing consumers of the `class` attribute are unaffected. See https://core.trac.wordpress.org/ticket/65102.
1 parent 047ef80 commit fbff6cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-admin/includes/class-wp-ms-users-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public function display_rows() {
502502
}
503503

504504
?>
505-
<tr class="<?php echo trim( $class ); ?>">
505+
<tr id="user-<?php echo (int) $user->ID; ?>" class="<?php echo trim( $class ); ?>">
506506
<?php $this->single_row_columns( $user ); ?>
507507
</tr>
508508
<?php

0 commit comments

Comments
 (0)