I'm working on a site with no navigation bar. Yet, when I turn off CSS, I still get a "Skip to navigation" link (which takes me nowhere). We should put a conditional around "Skip to navigation".

CommentFileSizeAuthor
#5 zen-255265.patch731 byteskmonty

Comments

krlkv’s picture

+1

jjeff’s picture

+1 :-)

Who's writing the patch?

C'mon, this is an easy one....

/me puts it on my todo list

niklp’s picture

JJEFF where is the damn patch already?! ;)

Will look when I install this, if no-one beats me to it (which they no doubt will).

giorgio79’s picture

I am getting this as well :) Any news Jeff? :D

kmonty’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta2
Status: Active » Needs review
StatusFileSize
new731 bytes

Looks like this one has been ignored for a while. Here is a patch.

Porting this to the 5.x branch would be equally easy.

SeanBannister’s picture

+1 good to commit.

johnalbin’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Needs review » Fixed

At first I thought you missed $search_box in the condition, but I think I see why you left it out. A search box by itself isn't really a "navigation" section.

Applied to HEAD (d6) and DRUPAL-5. Thanks, Kevin! You've been immortalized in the CHANGELOG. :-)

marcus7777’s picture

I would love help is it:

<div id="page"><div id="page-inner">

    <!-- <a name="top" id="navigation-top"></a> -->
+    <?php if ($navbar): ?>    
        <div id="skip-to-nav"><a href="#navigation"><?php print t('Skip to Navigation'); ?></a></div>
+    <?php endif; ?>  

      <div id="header"><div id="header-inner" class="clear-block">
johnalbin’s picture

Marcus, the updated code in page.tpl.php is:

   <?php if ($primary_links or $secondary_links or $navbar): ?>
     <div id="skip-to-nav"><a href="#navigation"><?php print t('Skip to Navigation'); ?></a></div>
   <?php endif; ?>
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.