mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Accessibility: moved H2 from weblib.php: print_side_block_start, to moodleblock.class.php: _title_html (validate, <span>s revert to <div>); skip block link - replaced pixel image with 'accesshide' text; use get_string.
This commit is contained in:
parent
9aa4592e79
commit
68ac3b35e0
@ -238,20 +238,22 @@ class block_base {
|
||||
global $CFG;
|
||||
|
||||
//Accessibility: validation, can't have <div> inside <h2>, use <span>.
|
||||
$title = '<span class="title">';
|
||||
$title = '<div class="title">';
|
||||
|
||||
if (!empty($CFG->allowuserblockhiding)) {
|
||||
//Accessibility: added static 'alt' text for the +- icon.
|
||||
$title .= '<span class="hide-show"><a href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, \'DIV\', \'sideblock\'); } ); return false;"><img src="'.$CFG->pixpath.'/spacer.gif" alt="hide OR show block" class="hide-show-image" /></a></span>';
|
||||
//TODO (nfreear): language string 'hide OR show block'
|
||||
$title .= '<div class="hide-show"><a title="'.get_string('showhideblock','access').'" href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, \'DIV\', \'sideblock\'); } ); return false;"><img src="'.$CFG->pixpath.'/spacer.gif" alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
|
||||
}
|
||||
|
||||
$title .= $this->title;
|
||||
//Accesssibility: added H2 (was in, weblib.php: print_side_block)
|
||||
$title .= '<h2>'.$this->title.'</h2>';
|
||||
|
||||
if ($this->edit_controls !== NULL) {
|
||||
$title .= $this->edit_controls;
|
||||
}
|
||||
|
||||
$title .= '</span>';
|
||||
$title .= '</div>';
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
@ -202,8 +202,11 @@ body#admin-index .copyright {
|
||||
/***
|
||||
*** Blocks
|
||||
***/
|
||||
a.skip-block {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.sideblock .header {
|
||||
.sideblock .header, .sideblock h2 {
|
||||
font-size:0.9em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -234,6 +234,17 @@ form.popupform {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/*Accessibility: text 'seen' by screen readers but not visual users. */
|
||||
.accesshide {
|
||||
position:absolute;
|
||||
left:-10000px;
|
||||
}
|
||||
img.resize {
|
||||
width:1em;
|
||||
height:1em;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** Header
|
||||
***/
|
||||
@ -398,7 +409,7 @@ table.flexible th.c0 {
|
||||
a.skip-block, .skip-block {
|
||||
display:block;
|
||||
width:2em;
|
||||
height:3px;
|
||||
height:4px;
|
||||
}
|
||||
.skip-block-to {
|
||||
font-size:1px;
|
||||
@ -427,10 +438,15 @@ ul.list, ul.list li {
|
||||
text-align: left;
|
||||
margin:0%;
|
||||
padding:4px;
|
||||
padding-bottom:0%;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-bottom: none;
|
||||
}
|
||||
.sideblock h2 {
|
||||
margin:0%;
|
||||
padding:0%;
|
||||
}
|
||||
|
||||
.sideblock .header .hide-show {
|
||||
float:right;
|
||||
|
Loading…
x
Reference in New Issue
Block a user