💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Requires presentational elements to only contain presentational children.
When an element is marked as presentational (with role="none" or role="presentation"), its semantic children should not be present as they would be confusing to assistive technology users.
This rule checks that elements with role="presentation" or role="none" don't contain semantic children that expect the parent's semantic structure.
Examples of incorrect code for this rule:
<template>
<ul role="presentation">
<li>Item</li>
</ul>
</template><template>
<table role="none">
<tr><td>Data</td></tr>
</table>
</template><template>
<ol role="presentation">
<li>Item</li>
</ol>
</template>Examples of correct code for this rule:
<template>
<ul role="presentation">
<div>Content</div>
</ul>
</template><template>
<ul>
<li>Item</li>
</ul>
</template><template>
<table>
<tbody>
<tr><td>Data</td></tr>
</tbody>
</table>
</template>