To meet all accessibility criteria it is In the Netherlands it is not allowed to use inline CSS styling. In the mollom.module file there is a prefix created with display:none; which could be replaced by element-hidden.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Oostie’s picture

Oostie’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: don_t_use_inline_css-2544576-1.patch, failed testing.

Oostie’s picture

FileSize
597 bytes

srry, fixed a typo

eshta’s picture

Status: Needs work » Needs review
eshta’s picture

Status: Needs review » Active

The inline style is added in order to prevent spambots from recognizing that the form input is actually hidden. Given that "element-hidden" is the standard Drupal class for hiding a form field, it wouldn't take much for a bot to take this class into account. Another approach would be to utilize a module-specific class that perform the same hiding action. If I were to guess as to why the inline style approach was selected it would be to prevent themes from accidentally overriding the custom style. I know that some themes out there don't even properly respect element-hidden depending on the type of form element is has been applied to.

I've seen some honeypot solutions where the usage of the inline styles is configurable and if you turn it off you are responsible for hiding the field yourself. This could be a more complicated solution for those who need to comply by specific rules like you do - but it sure does seem overly complicated. Maybe a more drupally approach would be to utilize theming to add the inline-style. This would leave sites free to override it as they see fit.

mgifford’s picture

Issue tags: +Accessibility

What is the accessibility problem with inline styles?