Skip to content

Fix toggle lookup to respect component root - #6714

Open
arpitjain099 wants to merge 2 commits into
uswds:developfrom
arpitjain099:chore/fix-toggle-root-scope-6244
Open

Fix toggle lookup to respect component root#6714
arpitjain099 wants to merge 2 commits into
uswds:developfrom
arpitjain099:chore/fix-toggle-root-scope-6244

Conversation

@arpitjain099

@arpitjain099 arpitjain099 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Hi team - this updates toggle so it resolves aria-controls from the control root node instead of always using document.

That lets banner toggles work when banner.on(root) is used with a shadow root.

I also added a banner regression test that initializes inside a shadow root and verifies open/close behavior.

Closes #6244.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ All commits on this PR now have a verified signature. Thanks for making that change!

@ethangardner ethangardner added the Needs: Internal Response 🔴 Gathering information to better respond label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Internal Response 🔴 Gathering information to better respond Package: Banner

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

USWDS - Bug: Toggle utility looks for elements in document, not in user-defined root

3 participants