</button>
      </div>
    </div>
  </div>
</div>

<div class="test-case" data-expect="C1,C2,C3,D1,D2,D3,B1,B2,B3,A1,A2,A3"
      data-description="Grid items are in nested display contents containers.">
  <div class=wrapper>
    <div style="display:contents" tabindex="0" id="A1">
      <div style="display:contents" tabindex="0" id="A2">
        <button style="order: 4" id="A3">A</button>
      </div>
    </div>
    <div style="display:contents" tabindex="0" id="B1">
      <div style="display:contents" tabi