PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
← All changes | views/class-all-tables-list-table.php +19 -0 3.3.2 → 3.4 View file →
@@ -7,8 +7,10 @@
7 7 * @author Tobias Bäthge
8 8 * @since 2.0.0
9 9 */
10 10
11 +declare(strict_types=1);
12 +
11 13 // Prohibit direct script loading.
12 14 defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
13 15
14 16 /**
@@ -189,8 +191,25 @@
189 191 * @return string HTML content of the cell.
190 192 */
191 193 protected function column_table_id( array $item ): string {
192 194 return esc_html( $item['id'] );
195 + }
196 +
197 + /**
198 + * Returns a clean label for the primary (Table Name) column's row header `aria-label`.
199 + *
200 + * Provides screen readers with just the table name as the row header name,
201 + * preventing them from computing the name from the full cell content.
202 + *
203 + * @since 3.3.4
204 + *
205 + * @param array<string, mixed> $item Data item for the current row.
206 + * @return string The table name.
207 + */
208 + protected function get_primary_column_aria_label( /* array */ $item ): string {
209 + // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited.
210 +
211 + return trim( $item['name'] );
193 212 }
194 213
195 214 /**
196 215 * Render a cell in the "table_name" column.