Skip to content

Fix: accessible table checkbox - select row & select all#384

Merged
rami-elementor merged 1 commit into
core-betafrom
a11y-input-labels
May 5, 2026
Merged

Fix: accessible table checkbox - select row & select all#384
rami-elementor merged 1 commit into
core-betafrom
a11y-input-labels

Conversation

@rami-elementor
Copy link
Copy Markdown
Contributor

This pull request improves accessibility in the snippet selection tables by adding labels and screen reader text to the checkbox elements, ensuring that users with assistive technologies can better understand and interact with the selection controls.

In short, we add <label> to <input> checkboxes, to solve the following :

Screenshot 2026-05-05 at 15 35 59

Note:

The PR also demoved an unnecessary React fragment in SnippetSelectionTable to simplify the component structure.

@rami-elementor rami-elementor requested a review from a team May 5, 2026 15:54
<tr key={snippet.table_data.id} className={`${snippet.table_data.type}-snippet`}>
<th scope="row" className="check-column">
<label htmlFor={`cb-select-${snippet.table_data.id}`}>
<span className="screen-reader-text">{__('Select snippet', 'code-snippets')}</span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe “Select snippet: {title}”?

@rami-elementor rami-elementor merged commit 17b1518 into core-beta May 5, 2026
8 checks passed
@rami-elementor rami-elementor deleted the a11y-input-labels branch May 5, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants