Skip to content

Conversation

@Adi-ty
Copy link
Contributor

@Adi-ty Adi-ty commented Sep 19, 2025

What?

Closes #71740

Adds "role": "content" to the title attribute in the accordion header block to make it editable when templateLock: "contentOnly" is applied to parent blocks.

Why?

When an Accordion block is wrapped with a Group block that has templateLock: "contentOnly" applied, users cannot edit the accordion header text.

How?

Added "role": "content" to the title attribute of accordion header block

Testing Instructions

  1. Create a new post or page in the block editor.
  2. Insert a Group block.
  3. Inside the Group block, add an Accordion block.
  4. Apply 1"templateLock": "contentOnly"` to the Group block (parent container).
  5. The accordion header text should remain editable.

Screenshots

Before After
Screenshot 2025-09-19 at 3 51 30 PM Screenshot 2025-09-19 at 3 52 09 PM

@Adi-ty Adi-ty marked this pull request as ready for review September 19, 2025 10:49
@github-actions
Copy link

github-actions bot commented Sep 19, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Adi-ty <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: theaminuli <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Accordion Affects the Accordion Block labels Sep 19, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@t-hamano t-hamano merged commit 2f61418 into WordPress:trunk Sep 19, 2025
75 of 78 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.8 milestone Sep 19, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Sep 22, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Accordion Affects the Accordion Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accordion Header: Add content role to title attribute

2 participants