Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name computation: Include shadow DOM in name from content #1470

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

Jym77
Copy link
Contributor

@Jym77 Jym77 commented Sep 7, 2023

See w3c/accname#167 for what accname seems to be planning.

Test page for browsers:

<div id="div1" role="button">
  <span slot="foo">Button in light, Slot in shadow</span>
</div>

<div id="div2"><span slot="foo">Button in shadow</span></div>

<script>
  const shadowRoot1 = document
    .getElementById("div1")
    .attachShadow({ mode: "open" });
  shadowRoot1.innerHTML = '<slot name="foo"></slot>';

  const shadowRoot2 = document
    .getElementById("div2")
    .attachShadow({ mode: "open" });
  shadowRoot2.innerHTML = '<button><slot name="foo"></slot></button>';
</script>

<div role="button"><iframe srcdoc="Hello"></iframe></div>

@Jym77 Jym77 self-assigned this Sep 7, 2023
@Jym77 Jym77 added the patch Backwards-compatible change that doesn't touch public API label Sep 7, 2023
@Jym77 Jym77 marked this pull request as ready for review September 8, 2023 08:15
@Jym77 Jym77 requested review from a team and rcj-siteimprove September 8, 2023 08:15
@Jym77 Jym77 enabled auto-merge September 8, 2023 08:16
@Jym77 Jym77 added this pull request to the merge queue Sep 8, 2023
Merged via the queue into main with commit 4f23124 Sep 8, 2023
6 checks passed
@Jym77 Jym77 deleted the investigate-shadow-dom-naming branch September 8, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Backwards-compatible change that doesn't touch public API
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

2 participants