Hi, on the latest site I'm developing I use only the logo, no site title text in the branding region. I'm noticing the alt tag is blank:
<div class="branding-data clearfix">
<div class="logo-img">
<a class="active" href="/"><img id="logo" alt="" src="http://local.dev/sites/tsr.com/themes/tsr/logo.png"></a>
I'm thinking there should be some sort of code like this in the templates/region--branding.tpl.php file. This is what Bartik has in it's page.tpl.php
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
Would be nice to have an option to set the ALT tag though in the Omega UI - alt="My website name".
Thanks!
-Tony
Comments
Comment #1
rowbotony commentedNevermind, my bad. My subtheme .tpl.php were from the alpha version, this is fixed in beta1, please disregard.
--Tony
Comment #2
rowbotony commentedSorry, back again, talking to myself. So, this may just be Drupal default behavior, though the Bartik theme is hard-coded with "Home" as the logo image alt text, Omega's logo img alt text is generated from the site-name being enabled.
Omega logo image only outputs the
<img alt="my site">, alt text if your site name is also enabled. I've enabled my site name, and hidden it with the Omega "hide via CSS" option. This outputs the img with alt tag, and hides the site title.Comment #3
fubhy commentedGood catch. Needs to be fixed.
Comment #4
cellar door commentedComment #5
2dareis2do commentedok so how do I now add an alt tag to the omega logo?
Ok figured this out, enable display site title form omega theme ui, then hide using css. Thanks drupleg.
i.e.
Still seems like a messy implementation to me. Not sure how this has been fixed?
An alternative might be to copy the region-branding.tpl.php from omega/omega/templates into your theme/templates, clear the cache and then try overiding manually as drupleg describes.