Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a text input form associated with mollom with id="edit-mollom-homepage" which doesn't have a label or title associated with it. It was difficult to find using WAVE because the input field is hidden.
I don't understand why this input element is hidden (via CSS) input element but it would be good to find some way to communicate what this field is and why it should be left alone by folks using screen readers.
Comment | File | Size | Author |
---|---|---|---|
#8 | mollom.honeypot-title.8.patch | 1.46 KB | sun |
#3 | mollom.honeypot-wave.3.patch | 456 bytes | sun |
Comments
Comment #1
Dave ReidI think this was on purpose. The code comments says "Add a spambot trap. Purposively use 'homepage' as field name." So you weren't supposed to notice it.
Comment #2
mgiffordIt would be better if it were:
Which would get around the accessibility problem the validator is seeing. It would also make it more convincing for the spanners I figure.
Anyways, it should be a pretty easy fix although screen readers won't see it since it uses CSS's display:none;
However, if user has disabled CSS then that would be an issue....
Mostly it's for validators however.
Comment #3
sunSo you're saying that this patch makes WAVE stop complaining?
Comment #4
mgiffordYup. And for other automated testing tools it's useful too. It's hard for the bots of any sort to see the if an element is visible or not...
I applied it here and it's working fine:
http://openconcept.ca/blog/mgifford/accessibility-tips-management
Thanks!
Comment #5
sunThanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Comment #6
mgiffordThanks sun!
Comment #8
sunUnfortunately, I've to re-open this very old issue. :-/
Turns out that Mollom Support frequently receives false-bug reports from site owners, who happen to use JavaScripts that are trying to mimic HTML5 placeholders.
Unlike http://drupal.org/project/compact_forms and other sophisticated JS libraries,
'title'
attribute into the'value'
of form input elements.In turn, such sites are running into massive false-positive spam classifications, and they obviously point the finger at Mollom... even though the bug is clearly caused on the client-side. :-/
While the root cause is very clear and, technically, the wrong party is blamed, I only recently noticed that this happens way too often and I do not want that to continue, as it harms Mollom's reputation, and also causes a lot of work on the Mollom Support end.
So, attached patch is my starting point. Removing the 'title' attribute that we previously added here.
The essential question is: Is there any way to mute/hide an input element completely from screen-readers?
Or... actually, not screen-readers. The only piece that ever complained here is the WAVE validator. So is there any other way to make WAVE stop complaining?
Due to the reasons outlined above, I'm highly tempted to commit this current patch in either case as-is. Especially as the root cause for adding the 'title' attribute was not actually that screen-readers would wrongly run into the trap, but instead, just a WAVE validator warning message. Of course, it's tough to balance the importance of a "bogus HTML validator message" vs. "completely bogus JavaScript". But since the latter has actual, hard implications on innocent end-users on many sites, it definitely has a higher priority here.
Comment #9
mgiffordYou can just use css display:none; to exclude something for screen readers.
There are also might be a way to just replace it with ARIA.
Comment #10
sunThanks, @mgifford! The field is already wrapped in a DIV container with a style attribute of display:none. However, that's still the same as we had originally, and you originally created this issue, because WAVE complained about the input field (despite being hidden). :)
Perhaps the WAVE validator has been fixed in the meantime? :)
Comment #11
sunCommitted to 7.x-2.x and 6.x-2.x. Thanks!