Skip to content

Headings tool not detecting headings that have an accessible name computed from an img alternative text #7697

@garyb1

Description

@garyb1

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Go to the codepen example https://codepen.io/garybyrne1/pen/NPNPLrJ
  2. In Accessibility Insights for Web, go to "Ad hoc tools > Headings" and toggle it on.
  3. Observe that the H3 on the img element which has alt text provided is not detected by the scanner

Expected behavior

All headings are expected

Screenshots

Image Image Image

Context (please complete the following information)

Are you willing to submit a PR?

Not familiar with codebase.

Did you search for similar existing issues?

#7579 -> Headings tool not detecting headings in the shadow DOM with slotted content

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions