Created attachment 373743 [details] repro of issue (wrapped by slot) with additional example of expected behavior (wrapped by div) Slot elements with focusable descendants trap focus during sequential focus navigation. This may seem like an edge case because the slot element is not being used for its intended purpose but it causes major accessibility issues for Shadow DOM polyfills.
<rdar://problem/52846658>
Looks like adding a positive tabindex on the slot element itself, and subsequent focusable element like this seems to work but this workaround doesn't seem to work when there are multiple slot elements. <div> <h3>three buttons wrapped with a slot</h3> <input> <input> <slot tabindex=1> <button>foo</button> <button>foo</button> <button>foo</button> </slot> <input tabindex=1> </div>
Created attachment 394579 [details] Fixes the bug
Created attachment 394580 [details] Fixes the bug
Created attachment 394583 [details] Fixed the test
Committed r259065: <https://trac.webkit.org/changeset/259065>