Skip to content

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

Merged
Jym77 merged 2 commits into
mainfrom
investigate-shadow-dom-naming
Sep 8, 2023
Merged

Jym77 merged 2 commits into
mainfrom
investigate-shadow-dom-naming

Conversation

@Jym77

@Jym77 Jym77 commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

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
@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

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants