JavaScript logoJavaScript/
JS-0738

Prefer that anchors have content and the content is accessible to screen readersJS-0738

Minor severityMinor
Anti-pattern categoryAnti-pattern

Making the content accessible means that it is not hidden using the aria-hidden prop.

Bad Practice

<a />
<a><TextWrapper aria-hidden /></a>
<a>Anchor Content!</a>
<a><TextWrapper /><a>
<a dangerouslySetInnerHTML={{ __html: 'foo' }} />