Skip to content

Warning when using role="text" on heading elements #107

@jackdomleo7

Description

@jackdomleo7

Describe the new a11y feature or project enhancement

The new role="text" is nice because it prevents a screenreader from breaking up sentences with <span> or <strong> inside, however when using it on a heading, it causes the heading to lose its semantic meaning.

Describe the solution you'd like

h1, h2, h3, h4, h5, h6 {
  &[role="text"] {
    // Show warning
  }
}

Link(s)

https://openinclusion.com/blog/using-role-text-enhance-mobile-screen-reader-output/

Metadata

Metadata

Assignees

Labels

a11y featureNew feature or request for an a11y checkgood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions