Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.ui

Keep interactive roles off static semantics

Headings, captions, and phrasing content should not pretend to be buttons or tabs without restructuring the markup.

#Metadata

Rule ID
ts.react.no-interactive-role-on-static-semantics
Severity
medium
Confidence
0.78
Languages
javascript, typescript
Presets
strict
Stability
experimental
Applies to
function
Tags
accessibility, react, rules-catalog, ui

#Why it matters

Mixing document roles with widget roles confuses assistive technologies and usually signals a heading or label that should stay static while a real control sits nearby.

#Remediation

Move the interaction to a sibling `button` or link, keep the heading for structure only, and wire behaviour with IDs or aria-controls instead of overloading roles.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.react.no-interactive-role-on-static-semantics.rule.yaml.