From 12b9aee7d7f32802247f715f1cb83e35661ae121 Mon Sep 17 00:00:00 2001 From: nfreear Date: Thu, 11 Oct 2007 16:35:20 +0000 Subject: [PATCH] Fixes MDL-11695, Skip block links inaccessible for many keyboard-only users --- lib/weblib.php | 10 ++++------ theme/standard/styles_layout.css | 17 +++++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 921db0fe68..5d428369db 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5926,15 +5926,13 @@ function print_side_block($heading='', $content='', $list=NULL, $icons=NULL, $fo else { $skip_text = get_string('skipa', 'access', strip_tags($title)); } - $skip_link = ''."\n".get_accesshide($skip_text)."\n".''; + $skip_link = ''.$skip_text.''; $skip_dest = ''; if (! empty($heading)) { - $heading = $skip_link . $heading; - } - /*else { //ELSE: I think a single link on a page, "Skip block 4" is too confusing - don't print. echo $skip_link; - }*/ + } + //ELSE: a single link on a page "Skip block 4" is too confusing - ignore. print_side_block_start($heading, $attributes); @@ -6593,4 +6591,4 @@ function fix_align_rtl($align) { // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140: -?> +?> \ No newline at end of file diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 850cf1de55..5229764454 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1178,14 +1178,15 @@ body#admin-modules table.generaltable td.c0 *** Blocks ***/ -/*Accessibility: Skip block link, for screen reader users. */ -a.skip-block, .skip-block { - display:block; - width:2em; - height:1px; +/*Accessibility: Skip block link, for keyboard-only users. */ +a.skip-block { + position: absolute; + top: -1000em; + font-size: 0.85em; } -.sideblock .skip-block { - height:4px; +a.skip-block:focus, a.skip-block:active { + position: static; + display: block; } .skip-block-to { display: block; @@ -4269,4 +4270,4 @@ wikiadminactions { background: #eee; border: 1px dashed #ddd; padding: 3px; -} +} \ No newline at end of file -- 2.39.5