markup-validator
markup-validator copied to clipboard
Attributes aria-posinset and aria-setsize not allowed on element a at this point.
trafficstars
If I check a page with a tab containing the code
<ul>
<li>
<a role="tab" aria-selected="true" aria-setsize="3" aria-posinset="1" target="_self" href="#" id="__BVID__400___BV_tab_button__" aria-controls="__BVID__400"><span>Study here</span></a>
</li>
<li>
<a role="tab" aria-selected="true" aria-setsize="3" aria-posinset="2" target="_self" href="#" id="__BVID__401___BV_tab_button__" aria-controls="__BVID__401"><span>Study there</span></a>
</li>
<li>
<a role="tab" aria-selected="true" aria-setsize="3" aria-posinset="3" target="_self" href="#" id="__BVID__402___BV_tab_button__" aria-controls="__BVID__402"><span>Study everywhere</span></a>
</li>
</ul>
I receive the errors:
Attribute aria-posinset not allowed on element a at this point. Attribute aria-setsize not allowed on element a at this point.
This is odd, because both attributes can/should be used on elments with the role="tab": https://www.digitala11y.com/aria-posinset-properties/ https://www.digitala11y.com/aria-setsize-properties/
I also get the error message, if role="tab" and the two aria-attributes are moved to th li-tag surrounding the a-tags.
Can you confirm, this code is w3c-compliant? If so, could you fix the validator? These aria-attirbutes are relatively new, maybe it can be updated.
Thanks a lot Jens Emde