[v2.0-rc] s-section: First slot="accessory" duplicates into parent s-page heading badge

In Polaris Web Components v2.0-rc, using slot="accessory" inside an <s-section> causes the first instance to duplicate into the parent <s-page> header as a badge. The element still renders inside its section, but the parent page also captures it.

Example

<s-page heading="Test page">
  <s-section heading="Test section 1">
    <s-text slot="accessory">#1</s-text>
  </s-section>
  <s-section heading="Test section 2">
    <s-text slot="accessory">#2</s-text>
  </s-section>
</s-page>

Expected behavior

The <s-page> heading should not change at all. Each accessory element should only display inside its own <s-section>.

Actual behavior

The first accessory (#1) renders inside its section and also duplicates into the <s-page> heading as a badge. The second accessory (#2) behaves correctly and only appears inside its section.

It looks like <s-page> also supports slot="accessory", though it is undocumented:

<s-page heading="Test page">
  <s-text slot="accessory">Test</s-text>
</s-page>

This likely explains the issue: <s-page> seems to grab the first accessory it finds anywhere inside itself, accidentally pulling in the one nested in <s-section>.

@TobiasDalhof Yes, this is the bug in Polaris web components v2.0-rc. slot=“accessory” has an issue so we don’t use it.

@TobiasDalhof This is now fixed. Can you try again?

Issue is fixed, thanks!