Skip to content

Color contrast may need to work across frame boundaries #4228

Open
@WilcoFiers

Description

@WilcoFiers

The HTML element of a page loaded in an iframe has opacity of 0. Because of this, the text in an iframe can be displayed on top of a background color that is in its parent frame:

I.e; Axe should not pass this:

<div style="background:#333">
  <iframe srcdoc="<h1>Hello world</h1>"></iframe>
</div>

Ideally axe-core should have an after method for its color contrast rules that can compute contrast of elements across frame boundaries. That's quite a big restructure for something that in practice has never been reported, so a simpler thing we could do is set incomplete for nodes inside a frame when there is no background.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions