Skip to content

Multiple headlines with same text on a page receive the same id, which leads to dublicated ids a11y violation #7310

@jackahl

Description

@jackahl

Describe the bug
When multiple blocks such as text or listing on a page contain the same text they receive the same html id. This is both a a11y violation as well as a usability problem for anchor links.

To Reproduce

  1. Edit a page
  2. Add 2 text blocks with text "My headline" and set them to h2 format
  3. Save and check the ids of those items --> both have the id "my-list"
  4. run the axe a11y tests on this page --> Test will fail with duplicate-id-active issue

Expected behavior
All headlines should have unique ids independent of their text content

Screenshots

Image

Metadata

Metadata

Assignees

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions