Skip to content

Accordion Header: Consider defining default style #71529

Closed

Description

@t-hamano

What problem does this address?

Many themes, especially the classic theme, apply styles to button elements. Since the Accordion block consists of the button element inside the heading element, such styles may also affect accordion headers, creating a slightly odd appearance.

What is your proposed solution?

It would be difficult to force all themes to add special styling for accordion header buttons, so I'd suggest applying the minimum amount of styling with the minimum CSS specificity.

In some themes, when you hover or focus on an accordion header, the text may not be visible at all, which we'll also need to fix.

Screenshots

It's also important to note that all themes below have different styles for the front-end and the editor.

Twenty Twenty One

Editor Front end
Image Image

Twenty Twenty

Editor Front end
Image Image

Twenty Nineteen

Editor Front end
Image Image

Twenty Seventeen

Editor Front end
Image Image

Activity

  1. adityaanurag0219 commented on Sep 7, 2025

    @adityaanurag0219

    Hi! I would like to work on this issue and submit a PR to fix the minimal styling of the Accordion header buttons.

  2. added theissue type on Sep 19, 2025
  3. t-hamano commented on Sep 19, 2025

    @t-hamano
    ContributorAuthor

    @adityaanurag0219 Please feel free to submit a PR 👍

  4. theminaldiwan commented on Oct 8, 2025

    @theminaldiwan
    Contributor

    hi @adityaanurag0219

    Just checking—are you currently working on this issue, or would you be okay if I pick it up and submit a PR?

  5. adityaanurag0219 commented on Oct 8, 2025

    @adityaanurag0219

    Hey! Thanks for checking 🙂
    You can go ahead and pick it up, please continue with the issue.

  6. added
    [Type] BugAn existing feature does not function as intended
    and removed on Oct 15, 2025
  7. moved this from 📥 Todo to 🏗️ In Progress in WordPress 6.9 Editor Taskson Oct 17, 2025
  8. ellatrix commented on Nov 11, 2025

    @ellatrix
    Member

    I don't quite understand why the accordion block wasn't <details> elements stacked. Then we wouldn't have this issue?

  9. t-hamano commented on Nov 11, 2025

    @t-hamano
    ContributorAuthor

    I don't quite understand why the accordion block wasn't <details> elements stacked. Then we wouldn't have this issue?

    The Details block already exists. The Accordion block exists for a different purpose.

    See: #64119 (comment)

  10. moved this from 🏗️ In Progress to ✅ Done in WordPress 6.9 Editor Taskson Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] AccordionAffects the Accordion Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions