Accessibility: weblib.php: function print_side_block, completed 'Skip block' link.

This commit is contained in:
nfreear
2006-03-03 11:48:02 +00:00
parent 5d77ace20b
commit bef6cd5d81
2 changed files with 11 additions and 15 deletions
+6 -6
View File
@@ -4304,18 +4304,18 @@ function rebuildnolinktag($text) {
*/
function print_side_block($heading='', $content='', $list=NULL, $icons=NULL, $footer='', $attributes = array()) {
//TODO (nfreear): Accessibility: skip link not invisible in Firefox - why?
$skip_dest ='';
/* static $block_id = 0;
//TODO (nfreear): Accessibility: skip block link. Proposed new file, lang/en_utf8/accessibility.php
global $CFG;
static $block_id = 0;
$block_id++;
$skip_link = "<a href='#block-$block_id' onfocus=\"this.style.color='#000'\" onblur=\"this.style.color='#fff'\" class='skip-block'>Skip block</a>";
$skip_dest = "<span id='block-$block_id' class='skip-block-to'>&nbsp;</span>";
$skip_link = "<a href='#sb-$block_id' title='Skip block' class='skip-block'><img alt='Skip block' src='$CFG->wwwroot/pix/spacer.gif' /></a>";
$skip_dest = "<span id='sb-$block_id' class='skip-block-to'>&nbsp;</span>";
if (! empty($heading)) {
$heading .= $skip_link;
} else {
echo $skip_link;
}
*/
print_side_block_start($heading, $attributes);
if ($content) {
+5 -9
View File
@@ -226,6 +226,8 @@ table.formtable tbody .htmlarea th
.helplink img {
vertical-align: middle;
margin: 0px 2px;
width: 17px;
height: 17px;
}
form.popupform {
@@ -392,17 +394,11 @@ table.flexible th.c0 {
*** Blocks
***/
/*TODO (nfreear): Initially make link 'invisible' to visual users. Breaks - why? */
/*Accessibility: Skip block link, for screen reader users. */
a.skip-block, .skip-block {
font-weight:normal;
font-size:0.8em;
color:white;
background-color:white;
/*
display:block;
width:6em;
float:right;
*/
width:2em;
height:3px;
}
.skip-block-to {
font-size:1px;