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.
Hi there,
I suggest to change a part of the code in the file page.tpl.php. The part if of the alt and the title attributes of logo. If I don't want display the site name or the slogan, I have a void alt and title attributes.
This is the original code:
<img src="<?php print $logo ?>" alt ="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" />
I suggest to change it in this:
<img src="<?php print $logo ?>" <?php if ($site_name_and_slogan): ?> alt ="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" <?php endif ?> id="logo" />
Comments
Comment #1
joachim CreditAttribution: joachim commentedSurely the IMG is only printed if $logo is not empty?
At any rate, closing 7.x issues. Feel free to reopen with more details if you feel this is still a problem on D8.