Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chrome console errors about bad label elements #532

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

bmbroom
Copy link
Member

@bmbroom bmbroom commented Jun 14, 2024

Chrome now complains about label elements with missing or incorrect "for" attributes. See issue #505.

I found four <label> elements in chm.html that were semantically labels, but not labels in the strict HTML sense as referring to a specific form input element.

I changed them to plain <span> elements. Since we weren't formatted them any differently from plain elements, I didn't add a class field that we could use as a css selector in the future. I could easily be convinced to add one.

Chrome now complains about label elements with missing or incorrect "for"
attributes. See issue #505.

I found four <label> elements in chm.html that were semantically labels,
but not labels in the strict HTML sense as referring to a specific form
input element.

I changed them to plain <span> elements.  Since we weren't formatted them
any differently from plain elements, I didn't add a class field that we
could use as a css selector in the future.  I could easily be convinced to
add one.
@bmbroom bmbroom self-assigned this Jun 14, 2024
@bmbroom bmbroom merged commit 1dcdbd2 into main Jun 17, 2024
@bmbroom bmbroom deleted the fix-labels-for-non-inputs branch June 17, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants