Skip to content

Object-alt rule should ignore objects that don't load things #3656

@WilcoFiers

Description

@WilcoFiers

The following is from an ACT inapplicable example, axe shouldn't fail this:

<object data="/invalid/url/index.html">
  <img src="/WAI/content-assets/wcag-act-rules/test-assets/shared/w3c-logo.png" alt="W3C logo" />
</object>

I'm not sure how to directly detect whether an object loaded something, but detecting that its pass-through content is displayed can easily be done by just checking that it's children have a position, for example by calling getClientRects() on them. There are probably other ways to do it too.

To do this we'll probably need a new matches method for objects that can filter out objects which show their content.

Metadata

Metadata

Assignees

Labels

ACT RulesfixBug fixesprA pr has been created for the issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions