diff options
-rw-r--r-- | modules/system/html.tpl.php | 3 | ||||
-rw-r--r-- | modules/system/page.tpl.php | 1 | ||||
-rw-r--r-- | themes/garland/page.tpl.php | 1 | ||||
-rw-r--r-- | themes/garland/style.css | 25 | ||||
-rw-r--r-- | themes/seven/page.tpl.php | 1 | ||||
-rw-r--r-- | themes/seven/style.css | 28 |
6 files changed, 59 insertions, 0 deletions
diff --git a/modules/system/html.tpl.php b/modules/system/html.tpl.php index 846a1ec70..727418a92 100644 --- a/modules/system/html.tpl.php +++ b/modules/system/html.tpl.php @@ -45,6 +45,9 @@ <?php print $scripts; ?> </head> <body class="<?php print $classes; ?>" <?php print $attributes;?>> + <div id="skip-link"> + <a href="#main-content"><?php print t('Skip to main content'); ?></a> + </div> <?php print $page_top; ?> <?php print $page; ?> <?php print $page_bottom; ?> diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php index bb2a6d3a3..e474a22fd 100644 --- a/modules/system/page.tpl.php +++ b/modules/system/page.tpl.php @@ -106,6 +106,7 @@ <div id="content" class="column"><div class="section"> <?php if ($page['highlight']): ?><div id="highlight"><?php print render($page['highlight']); ?></div><?php endif; ?> + <a name="main-content" id="main-content"></a> <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?> <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?> <?php print render($page['help']); ?> diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php index a3a1cf30e..cf01a8ee1 100644 --- a/themes/garland/page.tpl.php +++ b/themes/garland/page.tpl.php @@ -31,6 +31,7 @@ <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner"> <?php print $breadcrumb; ?> <?php if ($page['highlight']): ?><div id="highlight"><?php render($page['highlight']); ?></div><?php endif; ?> + <a name="main-content" id="main-content"></a> <?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?> <?php if ($title): ?><h2<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h2><?php endif; ?> <?php if ($tabs): ?><ul class="tabs primary"><?php print render($tabs) ?></ul></div><?php endif; ?> diff --git a/themes/garland/style.css b/themes/garland/style.css index bdc4e4972..eac8f2fb1 100644 --- a/themes/garland/style.css +++ b/themes/garland/style.css @@ -291,6 +291,31 @@ table .form-button, table .form-submit { } /** + * Skip link + */ +#skip-link a:link, #skip-link a:visited { + font-weight: bold; + background: #fff; + padding: 0px 5px; + text-decoration: none; + font-size: 80%; + text-align: right; + top: -99em; + left: auto; + position: absolute; +} + +#skip-link a:hover, #skip-link a:focus, #skip-link a:active { + height: auto; + width: auto; + overflow: visible; + top:0; + left:0; + position: fixed; + z-index: 1000; +} + +/** * Layout */ .region-header { diff --git a/themes/seven/page.tpl.php b/themes/seven/page.tpl.php index 503537c0d..0d3f378f4 100644 --- a/themes/seven/page.tpl.php +++ b/themes/seven/page.tpl.php @@ -1,6 +1,7 @@ <?php // $Id$ ?> + <a name="main-content" id="main-content"></a> <div id="branding" class="clearfix"> <?php print $breadcrumb; ?> <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?> diff --git a/themes/seven/style.css b/themes/seven/style.css index 4af9d220d..25c022550 100644 --- a/themes/seven/style.css +++ b/themes/seven/style.css @@ -51,6 +51,34 @@ legend { } /** + * Skip link. + */ +#skip-link { + margin-top: 20px; + position: absolute; + right: 40px; + z-index: 50; +} + +#skip-link a:link, +#skip-link a:visited { + -moz-border-radius: 10px; + -webit-border-radius: 10px; + border-radius: 10px; + background: #d5d5ce; + color: #444; + font-size: 0.94em; + padding: 1px 10px 2px; +} + +#skip-link a:hover, +#skip-link a:focus { + background: #444; + color: #fff; + text-decoration: none; +} + +/** * Branding. */ #branding { |