💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Disallows invalid ARIA roles in templates.
ARIA roles must be valid according to the ARIA specification. Using invalid roles can confuse assistive technologies and reduce accessibility.
This rule checks that all role attributes contain valid ARIA role values.
Examples of incorrect code for this rule:
<template>
<div role="invalid">Content</div>
</template><template>
<div role="btn">Should be "button"</div>
</template><template>
<div role="fake-role">Content</div>
</template>Examples of correct code for this rule:
<template>
<div role="button">Content</div>
</template><template>
<div role="navigation">Nav</div>
</template><template>
<div role="main">Main content</div>
</template><template>
<div>No role attribute</div>
</template>