Skip to content

Commit

Permalink
Merge pull request #22 from jerielizabeth/dev
Browse files Browse the repository at this point in the history
added aria landmarks and skipnav
  • Loading branch information
kimisgold committed Feb 26, 2015
2 parents 787468b + 7decb0f commit 6cc47ef
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
3 changes: 2 additions & 1 deletion common/footer.php
Expand Up @@ -3,7 +3,7 @@
</div><!-- end wrap -->


<footer>
<footer role="contentinfo">

<div id="footer-text">
<?php echo get_theme_option('Footer Text'); ?>
Expand All @@ -22,6 +22,7 @@
Omeka.showAdvancedForm();
Omeka.moveNavOnResize();
Omeka.mobileMenu();
Omeka.skipnav();
});
</script>

Expand Down
9 changes: 5 additions & 4 deletions common/header.php
Expand Up @@ -96,25 +96,26 @@
?>
</head>
<?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?>
<a href="#content" id="skipnav"><?php echo __('Skip to main content'); ?></a>
<?php fire_plugin_hook('public_body', array('view'=>$this)); ?>

<header>
<header role="banner">
<?php fire_plugin_hook('public_header', array('view'=>$this)); ?>
<div id="site-title"><?php echo link_to_home_page(theme_logo()); ?></div>
</header>

<div class="menu-button button">Menu</div>

<div id="wrap">
<nav id="primary-nav">
<nav id="primary-nav" role="navigation">
<?php echo public_nav_main(array('role' => 'navigation')); ?>
<div id="search-wrap">
<div id="search-wrap" role="search">
<?php if (get_theme_option('use_advanced_search') === null || get_theme_option('use_advanced_search')): ?>
<?php echo search_form(array('show_advanced' => true)); ?>
<?php else: ?>
<?php echo search_form(); ?>
<?php endif; ?>
</div>
</nav>
<div id="content">
<div id="content" role="main" tabindex="-1">
<?php fire_plugin_hook('public_content_top', array('view'=>$this)); ?>
21 changes: 20 additions & 1 deletion css/sass/_screen.scss
Expand Up @@ -99,7 +99,26 @@ blockquote {
right: 2.6667em;
}
}
#skipnav {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}

#skipnav:focus {
top:0;
z-index:9999;
clip:initial;
height:auto;
width:auto;
padding:.5em;
border:1px blue dashed;
}
/* @end */

/* @group ----- Reusable classes ----- */
Expand Down Expand Up @@ -1515,4 +1534,4 @@ input[type="button"],
height: auto;
}

/* @end */
/* @end */
21 changes: 21 additions & 0 deletions css/style.css
Expand Up @@ -469,6 +469,27 @@ table {
margin-right: 2.6667em;
}

#skipnav {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}

#skipnav:focus {
top: 0;
z-index: 9999;
clip: initial;
height: auto;
width: auto;
padding: .5em;
border: 1px blue dashed;
}

/* @end */
/* @group ----- Reusable classes ----- */
.active {
Expand Down
6 changes: 6 additions & 0 deletions javascripts/globals.js
Expand Up @@ -91,4 +91,10 @@ if (!Omeka) {
});
};

Omeka.skipnav = function() {
$("#skipnav").click(function() {
$("#content").focus()
});
};

})(jQuery);

0 comments on commit 6cc47ef

Please sign in to comment.