Hi @tada1
2 textareas and only one label and the one which is hidden has the label associated and the visible one with dynamic properties not. I am pretty sure that this causes the problem.
I understand where you are coming from, but I think this could be a bug in Lighthouse. Let me explain:
The label is coming from WordPress itself:
<label for="comment">
The “for” attribute is aiming at an ID.
ASB is adding a new “honeypot” comment field which is visually hidden via inline CSS:
<textarea id="comment" aria-label="hp-comment" aria-hidden="true" name="comment" autocomplete="new-password" style="padding:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;position:absolute !important;white-space:nowrap !important;height:1px !important;width:1px !important;overflow:hidden !important;" tabindex="-1"></textarea>
It actually has a label via aria-label
attribute and is hidden via aria-hidden="true"
.
To prevent styling issues, we now use inline JS to switch the IDs (line 1275-1278) back between real comment form field and honeypot.
It looks like Lighthouse has a problem with the JS here and is testing the markup before applying the JS. Or is ignoring the ARIA markup?
If you have a GitHub account, please find these discussions:
https://github.com/pluginkollektiv/antispam-bee/issues/434
and
https://github.com/pluginkollektiv/antispam-bee/issues/292
Maybe adding hidden
instead of aria-hidden
could help here, too?
If you have an idea to fix this without breaking the spam protection, please add your insights on GitHub (or here) and we will happily make this 100% again ??
I will check this next week in more detail too.
All the best
Torsten