Skip to content

Stacking-order bug with multiple pseudo stacks #5213

Description

@straker

The following should pass color-contrast but fails:

<body style="background: #00000073">
  <div id="1" style="position: fixed; z-index: 50;">
    <div id="2" style="position: fixed; background: #280071">
      <div id="3" style="position: relative">
        <div id="target" style="transform: matrix(1, 0, 0, 1, 0, 0); color: #fff">text</div>
      </div>
    </div>
  </div>
</body>

The issue is that the stack is incorrect and it places the target element below the elements 1 and 2 when it should be placed above it. This causes a bug when we call reduceElementsBelowFloating as it sees elements 1 and 2 as being above the target element and removes them from the color contrast check, so we don't get the background color of 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions