From 32ba91e6f58c32b35da153e7a8bff40789900933 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 22 Sep 2023 19:56:48 +0000 Subject: [PATCH] Administration: Switch order of label/checkbox in `WP_List_Table`. Move the label after the checkbox in `WP_List_Table` instances. Resolve a false positive that will be presented by automated accessibility testing tools. Follow up to [55954]. Props dimitrism, joedolson, sabernhardt, oglekler, marybaum, tobiasbg. Fixes #58703. git-svn-id: https://develop.svn.wordpress.org/trunk@56665 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/list-tables.css | 13 ++++++++++--- .../includes/class-wp-comments-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-links-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-list-table.php | 6 +++--- src/wp-admin/includes/class-wp-media-list-table.php | 4 ++-- .../includes/class-wp-ms-sites-list-table.php | 5 ++--- .../includes/class-wp-ms-themes-list-table.php | 4 ++-- .../includes/class-wp-ms-users-list-table.php | 4 ++-- .../includes/class-wp-plugins-list-table.php | 8 ++++---- src/wp-admin/includes/class-wp-posts-list-table.php | 4 ++-- .../includes/class-wp-privacy-requests-table.php | 4 ++-- src/wp-admin/includes/class-wp-terms-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-users-list-table.php | 8 ++++---- src/wp-admin/update-core.php | 8 ++++---- 14 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index 3f0519e561..07cbc6229d 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -570,7 +570,8 @@ th.sorted.desc:hover .sorting-indicator.asc:before { position: relative; } -.check-column .label-covers-full-cell { +.check-column label { + box-sizing: border-box; width: 100%; height: 100%; display: block; @@ -579,15 +580,21 @@ th.sorted.desc:hover .sorting-indicator.asc:before { left: 0; } -.check-column .label-covers-full-cell + input { +.check-column input { position: relative; z-index: 1; } -.check-column .label-covers-full-cell:hover + input { +.check-column input:where(:not(:disabled)):hover, +.check-column:hover input:where(:not(:disabled)) { box-shadow: 0 0 0 1px #2271b1; } +.check-column label:hover, +.check-column input:hover + label { + background: rgba(0, 0, 0, 0.05); +} + .locked-indicator { display: none; margin-left: 6px; diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 401dde0d97..c4f288d8d0 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -896,7 +896,8 @@ class WP_Comments_List_Table extends WP_List_Table { if ( $this->user_can ) { ?> -