By runeveryday on
what does this code do ?the code is excerpted from zen theme.
<a name="top" id="navigation-top"></a>
<?php if ($primary_links || $secondary_links || $navbar): ?>
<div id="skip-to-nav"><a href="#navigation"><?php print t('Skip to Navigation'); ?></a></div>
<?php endif; ?>i don't know what the hell the code does ?who can tell me.any tips would be appreciated!
Comments
I haven't worked with Zen,
I haven't worked with Zen, but it looks like it's (a) testing to see whether there are any primary links, secondary links, or navbar items; and (b) if there are, inserting a link that reads "Skip to Navigation" and takes the user to the anchor with the title "navigation" (I presume that's in the region where those link blocks are usually put in Zen).
the amazing thing is the
the amazing thing is the style of "Skip to Navigation" color is white. it's too hard to find the link.
When you first visit a site
When you first visit a site you can click the tab key and then press enter. It takes you past the header and links to the area where your first article is. This is a accessibility thing.