Skip to content

Fix: update snippet add/edit screen markup & headings structure#360

Merged
rami-elementor merged 2 commits intocore-betafrom
a11y-add-edit-snippet-screen
Apr 23, 2026
Merged

Fix: update snippet add/edit screen markup & headings structure#360
rami-elementor merged 2 commits intocore-betafrom
a11y-add-edit-snippet-screen

Conversation

@rami-elementor
Copy link
Copy Markdown
Contributor

@rami-elementor rami-elementor commented Apr 17, 2026

Fix heading structure - remove <h2>, <h3>, <h4> tags - replace with label tags.

Now, clicking the labels also affects the input/select/checkbox elements.

Keyboard navigation is simpler now and the accessibility tree is clearer.

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the snippet add/edit UI markup to improve heading structure and label semantics across the React-driven admin screens, with accompanying CSS adjustments to preserve layout and visual hierarchy.

Changes:

  • Refactors several field headers from heading tags (h2/h3/h4) into proper <label> / <strong> elements and updates the edit screen title heading level.
  • Improves accessibility metadata (e.g., adds region labeling for the upsell banner, adds an aria-label to the dismiss button).
  • Adjusts sidebar and form styles to support the new markup structure and spacing.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/js/components/common/UpsellBanner.tsx Adds region semantics and labeling for the upsell banner and improves dismiss button accessibility text.
src/js/components/EditMenu/SnippetForm/page/PageHeading.tsx Changes the edit screen heading element level.
src/js/components/EditMenu/SnippetForm/fields/TagsEditor.tsx Moves “Snippet Tags” labeling into the FormTokenField label prop.
src/js/components/EditMenu/SnippetForm/fields/SnippetLocationInput.tsx Converts a heading-wrapped label into a direct <label> for the select input.
src/js/components/EditMenu/SnippetForm/fields/NameInput.tsx Refines the screen-reader label text for the snippet name field.
src/js/components/EditMenu/SnippetForm/fields/DescriptionEditor.tsx Converts heading-wrapped label into a direct <label> for the description editor textarea.
src/js/components/EditMenu/SnippetForm/fields/CodeEditor.tsx Converts heading-wrapped label into a direct <label> for the code editor textarea.
src/js/components/EditMenu/EditorSidebar/controls/RTLControl.tsx Removes heading wrapper and uses a direct <label> for the select control.
src/js/components/EditMenu/EditorSidebar/controls/PriorityInput.tsx Removes heading wrapper and tweaks tooltip styling hook.
src/js/components/EditMenu/EditorSidebar/controls/MultisiteSharingSettings.tsx Restructures label/status/switch markup for better semantics and layout control.
src/js/components/EditMenu/EditorSidebar/controls/LockControl.tsx Restructures label/status/switch markup for better semantics and layout control.
src/js/components/EditMenu/EditorSidebar/controls/ActivationSwitch.tsx Restructures label/status/switch markup and keeps activation behavior.
src/js/components/EditMenu/EditorSidebar/actions/ShortcodeInfo.tsx Fixes invalid heading nesting in modal content and adjusts sidebar label markup.
src/js/components/EditMenu/ConditionModal/ConditionModalButton.tsx Adjusts “Conditions” header markup and switches container class for inline layout.
src/css/edit/_sidebar.scss Updates sidebar flex/layout rules to match the new markup and badge positioning.
src/css/edit/_gpt.scss Adds label styling for the tags editor area.
src/css/edit/_form.scss Updates conditions editor button layout behavior and adds upper/lower form spacing.
src/css/edit.scss Adds label styling for description/code areas and removes some legacy spacing rules.

Comment thread src/js/components/EditMenu/EditorSidebar/controls/ActivationSwitch.tsx Outdated
Comment thread src/js/components/EditMenu/SnippetForm/page/PageHeading.tsx
…itch.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rami-elementor rami-elementor requested a review from a team April 17, 2026 13:20
@louiswol94 louiswol94 added the run-tests Trigger automated tests label Apr 20, 2026
@rami-elementor rami-elementor merged commit 278e9ee into core-beta Apr 23, 2026
23 checks passed
@rami-elementor rami-elementor deleted the a11y-add-edit-snippet-screen branch April 23, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants