Skip to content

feat: add headingLevel property to accordion - #12133

Merged
web-padawan merged 2 commits into
mainfrom
claude/issue-6900-20260714-1242
Jul 15, 2026
Merged

web-padawan merged 2 commits into
mainfrom
claude/issue-6900-20260714-1242

Conversation

@web-padawan

@web-padawan web-padawan commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Adds a headingLevel property to vaadin-accordion-panel that sets the aria-level attribute on the vaadin-accordion-heading element, so the heading can be exposed at the level matching the page structure.

Part of #6900

Generated with Claude Code

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the changes — left 2 comments.

Finding
🧹 __headingLevelChanged hand-rolls attribute delegation that DelegateStateMixin already provides.
👀 No test swaps the summary node at runtime after headingLevel is set, so re-applying aria-level to a new heading is never exercised.

@web-padawan
web-padawan force-pushed the claude/issue-6900-20260714-1242 branch 2 times, most recently from 98c82a6 to 510a8d8 Compare July 14, 2026 13:19
@web-padawan
web-padawan force-pushed the claude/issue-6900-20260714-1242 branch 2 times, most recently from 16ca4fe to 01f20b8 Compare July 15, 2026 07:35
@web-padawan
web-padawan requested a review from sissbruecker July 15, 2026 07:35
@web-padawan
web-padawan force-pushed the claude/issue-6900-20260714-1242 branch from 01f20b8 to 6122cde Compare July 15, 2026 07:37
@web-padawan web-padawan changed the title feat: add headingLevel property to accordion panel feat: add headingLevel property to accordion Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@web-padawan
web-padawan merged commit f7b26a9 into main Jul 15, 2026
10 checks passed
@web-padawan
web-padawan deleted the claude/issue-6900-20260714-1242 branch July 15, 2026 09:21
web-padawan added a commit that referenced this pull request Jul 15, 2026
The accordion set aria-level directly on each panel heading from its own
updated() callback. When a panel heading was created or replaced later (a
default heading, summary set after attach, or a swapped element), nothing
re-applied the level, so it was silently dropped. In Firefox the heading
could also be missing during the initial updated(), which threw.

Propagate headingLevel to each panel and let the panel delegate it to its
heading as the aria-level attribute via DelegateStateMixin, which
re-applies the value whenever the heading element changes.

Follow-up to #12133
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants