adamsilver / nostyle

NoStyle Design System by Adam Silver

Home Page:https://nostyle.onrender.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

W3C HTML validation issue with your validation script

trevorsaint opened this issue · comments

On pages where you use your validation script you add directly into the DOM the following:

<div tabindex="-1" role="group" class="errorSummary hidden" aria-labelledby="errorSummary-heading"></div>

Although this is hidden prior to error, it causes a W3C validation error.

You can’t have the aria-labelledby at this point because the attribute must point to an element in the same document. At this point it has not been injected into the page.

It might be worth adding this attribute at the point of an error instead of adding it directly.