AccessLint / accesslint.js

Keep accessibility errors in check.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: False alarm for hidden input fields

VincentTam opened this issue · comments

Background

Hi, this is the maintainer of @staticmanlab, a public GitLab instance for Staticman. I've recently created PR pacollins/hugo-future-imperfect-slim#69 to introduced a new feature to the project (nested Staticman comments).

Problem

The setup of Staticman with reCAPTCHA for a static blog (theme) requires some hidden form fields.

<input hidden name="options[reCaptcha][siteKey]" value="{{ .sitekey }}">
<input hidden name="options[reCaptcha][secret]" value="{{ .encryptedkey }}">
<div class="g-recaptcha" data-sitekey="{{ .sitekey }}"></div>

Despite their invisibility in the rendered page, AccessLint has raised a false alarm for "missing label".

Screenshot from 2019-08-17 14-24-56

Expected behavior

No false alarm for hidden fields.

Remarks

Thanks for your great project. It spotted out a missing image alt in my image tags for Gravatar.

I've also seen this issue, and have been looking for a place to report the behavior. Specifically, on this change:

MITLibraries/MITlibraries-parent#287

There are "violations" being reported for missing labels on both hidden fields and buttons - neither of which to my understanding require label elements.

WebAIM discusses buttons here:
https://webaim.org/techniques/forms/controls#button

Mozilla Developer Network also discusses this here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#Interactive_content

is the same for me
image

How to prevent this ?

Resolved. Thanks y'all for the reports.