Elements with role="text" contain focusable content
Automated check aria-text, run with axe-core
- WCAG
- Best practice: a recommendation, not a WCAG success criterion
- Severity
- Moderate: a degraded experience
- Typical effort
- Quick win, under 1 hour
- Category
- Keyboard
Who this affects
Screen reader and keyboard users.
Why it matters
role="text" flattens its content into plain text for assistive technology, so a link or button inside it can receive focus without being announced as something to operate.
How to fix it
Remove role="text" from elements that contain links, buttons or other focusable content.
Check your own website
The free scan tests 3 pages against WCAG 2.2 A and AA in about 30 seconds. No sign-up.
Related checks: Keyboard
- Duplicate access keys
- Hidden elements can still receive keyboard focus
- No way to skip repeated navigation
- Focusable elements have no suitable role
- Frames with interactive content cannot be reached by keyboard
- Scrollable areas cannot be reached by keyboard
- Skip links point to nothing
- Positive tabindex values disrupt focus order