Conversation
PR #118 removed role/aria-roledescription/aria-label identity attrs for keyboard a11y, which broke site-wide CSS that targeted those hooks (RapidWeaver #4467). Add data-rw-accordion and .rw-accordion on the root as a non-ARIA compat shim without restoring the a11y-problematic attrs. Co-authored-by: Tom Bradley <Tpbradley@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a Core Pack regression that broke site-wide custom CSS targeting Accordion identity attributes after Elements 3.0.10.
Related: RapidWeaver #4467
PR #118 (
a03f7e1) correctly removedrole="group",aria-roledescription="accordion", andaria-label="Accordion section …"(raw node id) for keyboard a11y. That also removed the only stable Accordion identity hooks some site-wide custom CSS relied on.Change
On the Accordion root (
hooks.source.js/ builthooks.js):rw-accordiondata-rw-accordionCSS can target either
.rw-accordionor[data-rw-accordion].Explicitly not restored
aria-labelwith the raw node id (the a11y bug Make Accordion keyboard operable (WCAG 2.2 SC 2.1.1) #118 fixed)role="group"/aria-roledescription="accordion"(compat shim is the non-ARIA hook)Preserved from #118
tabindex="0"on summary (preview mode)@keydown.enter.prevent/@keydown.space.preventfocus-visiblering classesCore Pack only — no RapidWeaver app / wrapper changes.
Test plan
node --test test/accordion-component.test.mjs(hooks emit both CSS hooks; no restored ARIA identity; focus-visible classes remain)class="… rw-accordion …"anddata-rw-accordion