I'm getting the following appearing:

<div class="entity entity-bean bean-text-block clearfix" about="/block/header---contact" typeof="" class="entity entity-bean bean-text-block">

i.e. the classes are getting added twice, breaking validation.

Comments

indytechcook’s picture

Status: Active » Postponed (maintainer needs more info)

Hello and thanks for logging an issue.

Here is bean.tpl.php:

<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>

  <div class="content"<?php print $content_attributes; ?>>
    <?php
      print render($content);
    ?>
  </div>
</div>

Is it possible your theme is putting the classes array in both attributes and classes? Do you see this issue in other areas where the classes are printed separately then the attributes?

gdaw’s picture

Issue summary: View changes

For us this issue causes w3c validation errors and therefore fails wcag accessibility requirements.

class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>

Classes are being manually added by print $classes; , "clearfix" being appended and then print $attributes; is adding the same classes.

I would suggest keeping only print attributes since it includes other attributes and adding clearfix to the attributes class array.

We have tested this solution and it seems to be working fine.

gdaw’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
Related issues: +#1911204: class attribute of entity wrapper div is printed twice

We found the cause of the problem is theme-related, Omega theme and sub-themes are the source of the class and attributes being duplicated.

class attribute of entity wrapper div is printed twice