MDL-7434 all images that convey information should have alt text to convey that information - part 1

This commit is contained in:
skodak 2006-11-24 20:16:37 +00:00
parent 536a640218
commit 344044b28e
16 changed files with 42 additions and 36 deletions

View File

@ -188,10 +188,10 @@
if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.$USER->sesskey.'" title="'.$strhide.'">'.
'<img src="'.$CFG->pixpath.'/i/hide.gif" height="16" width="16" alt="" /></a>';
'<img src="'.$CFG->pixpath.'/i/hide.gif" height="16" width="16" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.$USER->sesskey.'" title="'.$strshow.'">'.
'<img src="'.$CFG->pixpath.'/i/show.gif" height="16" width="16" alt="" /></a>';
'<img src="'.$CFG->pixpath.'/i/show.gif" height="16" width="16" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($blockobject->instance_allow_multiple()) {

View File

@ -201,13 +201,13 @@
// get hide/show link
if (in_array($path, $activefilters)) {
$hideshow = "<a href=\"$myurl&amp;action=hide&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/hide.gif\" height=\"16\" width=\"16\" alt=\"hide\" /></a>";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/hide.gif\" height=\"16\" width=\"16\" alt=\"$txt->hide\" /></a>";
$hidden = false;
$displayname = "<span>$name</span>";
}
else {
$hideshow = "<a href=\"$myurl&amp;action=show&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" height=\"16\" width=\"16\" alt=\"show\" /></a>";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" height=\"16\" width=\"16\" alt=\"$txt->show\" /></a>";
$hidden = true;
$displayname = "<span class=\"dimmed_text\">$name</span>";
}
@ -217,14 +217,14 @@
if (!$hidden) {
if ($updowncount>1) {
$updown .= "<a href=\"$myurl&amp;action=up&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/up.gif\" alt=\"up\" /></a>&nbsp;";
$updown .= "<img src=\"$img/up.gif\" alt=\"$txt->up\" /></a>&nbsp;";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" height=\"16\" width=\"16\" alt=\"\" />&nbsp;";
}
if ($updowncount<$activefilterscount) {
$updown .= "<a href=\"$myurl&amp;action=down&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/down.gif\" alt=\"down\" /></a>";
$updown .= "<img src=\"$img/down.gif\" alt=\"$txt->down\" /></a>";
}
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" height=\"16\" width=\"16\" alt=\"\" />";

View File

@ -74,6 +74,8 @@
$strchoosefiletoedit = get_string('langchoosefile', 'admin');
$streditennotallowed = get_string('langnoeditenglish', 'admin');
$strfilecreated = get_string('langfilecreated', 'admin');
$strprev = get_string('previous');
$strnext = get_string('next');
// FIXME / TODO
// remove following lines after adding string into proper english lang pack
@ -448,9 +450,9 @@
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $CFG->pixpath . '/t/down.gif" height="11" width="11" border="0" alt="" /></a>';
'<img src="' . $CFG->pixpath . '/t/down.gif" height="11" width="11" border="0" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $CFG->pixpath . '/t/up.gif" height="11" width="11" border="0" alt="" /></a>';
'<img src="' . $CFG->pixpath . '/t/up.gif" height="11" width="11" border="0" alt="'.$strprev.'" /></a>';
} else {
$missingtarget = '';
$missingnext = '';

View File

@ -172,11 +172,11 @@
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
"<img src=\"$CFG->pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
"<img src=\"$CFG->pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"$strhide\" /></a>";
$class = "";
} else {
$visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strshow\">".
"<img src=\"$CFG->pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
"<img src=\"$CFG->pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"$strshow\" /></a>";
$class = "class=\"dimmed_text\"";
}
if ($module->name == "forum") {

View File

@ -85,7 +85,7 @@
if (empty($CFG->gdversion)) {
echo '<div align="center">(' . get_string("gdneed") .')</div>';
} else {
echo '<div align="center"><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
echo '<div align="center"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
}
$table = new StdClass;

View File

@ -20,7 +20,7 @@ class block_admin_bookmarks extends block_base {
}
function create_item($visiblename,$link,$icon) {
$this->tempcontent .= '<a href="' . $link . '"><img src="' . $icon . '" border="0" alt="[item]" /> ' . $visiblename . '</a><br />' . "\n";
$this->tempcontent .= '<a href="' . $link . '"><img src="' . $icon . '" border="0" alt="" /> ' . $visiblename . '</a><br />' . "\n";
}
function get_content() {

View File

@ -31,11 +31,13 @@ class block_admin_tree extends block_base {
function open_folder($visiblename) {
global $CFG;
$strfolderopened = s(get_string('folderopened'));
for ($i = 0; $i < $this->currentdepth; $i++) {
$this->tempcontent .= "&nbsp;&nbsp;&nbsp;";
}
$this->tempcontent .= '<a href="javascript:toggle(\'vh_span' . $this->spancounter . '\');">';
$this->tempcontent .= '<span id="vh_span' . $this->spancounter . 'indicator"><img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="[open folder]" /></span> ';
$this->tempcontent .= '<span id="vh_span' . $this->spancounter . 'indicator"><img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="'.$strfolderopened.'" /></span> ';
$this->tempcontent .= $visiblename . '</a><br /><span id="vh_span' . $this->spancounter . '">' . "\n";
$this->currentdepth++;
$this->spancounter++;
@ -51,7 +53,7 @@ class block_admin_tree extends block_base {
for ($i = 0; $i < $this->currentdepth; $i++) {
$this->tempcontent .= "&nbsp;&nbsp;&nbsp;";
}
$this->tempcontent .= '<a class="'.$class.'" href="'.$link.'"><img src="'.$icon.'" border="0" alt="[item]" />'.
$this->tempcontent .= '<a class="'.$class.'" href="'.$link.'"><img src="'.$icon.'" border="0" alt="" />'.
$visiblename.'</a><br />'."\n";
}

View File

@ -33,7 +33,7 @@ class block_course_summary extends block_base {
} else {
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$COURSE->id;
}
$this->content->text .= "<div align=\"right\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"\" /></a></div>";
$this->content->text .= "<div align=\"right\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"".get_string('edit')."\" /></a></div>";
}
$this->content->footer = '';

View File

@ -51,7 +51,7 @@ class block_social_activities extends block_list {
$editbuttons = '';
if ($ismoving) {
$this->content->icons[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11" alt=\"\" />';
$this->content->icons[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11" alt="" />';
$this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&amp;sesskey='.$USER->sesskey.'">'.$strcancel.'</a>)';
}

View File

@ -344,13 +344,13 @@
if (has_capability('moodle/site:backup', $coursecontext)) {
echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="'.$strbackup.'" /></a> ';
}
if (has_capability('moodle/site:restore', $coursecontext)) {
echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
'&amp;wdir=/backupdata">'.
'<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="'.$strrestore.'" /></a> ';
}
if (has_capability('moodle/category:update', $context)) {
@ -381,16 +381,16 @@
if (!empty($acourse->guest)) {
echo '<a href="view.php?id='.$acourse->id.'"><img hspace="2" title="'.
$strallowguests.'" alt="" height="16" width="16" border="0" src="'.
$CFG->pixpath.'/i/user.gif" /></a>';
$CFG->pixpath.'/i/user.gif" alt="'.$strallowguests.'" /></a>';
}
if (!empty($acourse->password)) {
echo '<a href="view.php?id='.$acourse->id.'"><img hspace="2" title="'.
$strrequireskey.'" alt="" height="16" width="16" border="0" src="'.
$CFG->pixpath.'/i/key.gif" /></a>';
$CFG->pixpath.'/i/key.gif" alt="'.$strrequireskey.'" /></a>';
}
if (!empty($acourse->summary)) {
link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo",
'<img hspace="2" alt="info" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/info.gif" />',
'<img hspace="2" alt="'.get_string('info').'" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/info.gif" />',
400, 500, $strsummary);
}
echo "</td>";

View File

@ -260,7 +260,7 @@ while ($section <= $course->numsections) {
if (isediting($course->id)) {
echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" border="0" height="11" width="11" alt="" /></a><br /><br />';
'<img src="'.$CFG->pixpath.'/t/edit.gif" border="0" height="11" width="11" alt="'.$streditsummary.'" /></a><br /><br />';
}
echo '</div>';
@ -275,11 +275,11 @@ while ($section <= $course->numsections) {
echo '<td class="right side">';
if ($displaysection == $section) { // Show the zoom boxes
echo '<a href="view.php?id='.$course->id.'&amp;topic=0#section-'.$section.'" title="'.$strshowalltopics.'">'.
'<img src="'.$CFG->pixpath.'/i/all.gif" height="25" width="16" border="0" /></a><br />';
'<img src="'.$CFG->pixpath.'/i/all.gif" height="25" width="16" border="0" alt="'.$strshowalltopics.'" /></a><br />';
} else {
$strshowonlytopic = get_string('showonlytopic', '', $section);
echo '<a href="view.php?id='.$course->id.'&amp;topic='.$section.'" title="'.$strshowonlytopic.'">'.
'<img src="'.$CFG->pixpath.'/i/one.gif" height="16" width="16" border="0" alt="" /></a><br />';
'<img src="'.$CFG->pixpath.'/i/one.gif" height="16" width="16" border="0" alt="'.$strshowonlytopic.'" /></a><br />';
}
if (isediting($course->id)) {

View File

@ -363,16 +363,16 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
if (has_capability('moodle/category:delete', $context)) {
echo "<a title=\"$str->delete\" href=\"index.php?delete=$category->id&amp;sesskey=$USER->sesskey\"><img".
" src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
" src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"$str->delete\" /></a> ";
}
if (has_capability('moodle/category:visibility', $context)) {
if (!empty($category->visible)) {
echo "<a title=\"$str->hide\" href=\"index.php?hide=$category->id&amp;sesskey=$USER->sesskey\"><img".
" src=\"$CFG->pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
" src=\"$CFG->pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"$str->hide\" /></a> ";
} else {
echo "<a title=\"$str->show\" href=\"index.php?show=$category->id&amp;sesskey=$USER->sesskey\"><img".
" src=\"$CFG->pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"\" /></a> ";
" src=\"$CFG->pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"$str->show\" /></a> ";
}
}

View File

@ -108,9 +108,9 @@
echo "(".get_string("gdneed").")";
} else {
if ($mode == STATS_MODE_DETAILED) {
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&userid='.$userid.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&userid='.$userid.'" alt="'.get_string('statisticsgraph').'" /></center>';
} else {
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&roleid='.$roleid.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&roleid='.$roleid.'" alt="'.get_string('statisticsgraph').'" /></center>';
}
}

View File

@ -193,7 +193,7 @@
// checks whether user can update course settings
if (has_capability('moodle/course:update', $coursecontext)) {
echo "<a title=\"".get_string("settings")."\" href=\"$CFG->wwwroot/course/edit.php?id=$course->id\"><img".
" src=\"$pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("settings")."\"></a> ";
}
// checks whether user can do role assignment
@ -205,30 +205,30 @@
// checks whether user can delete course
if (has_capability('moodle/course:delete', $coursecontext)) {
echo "<a title=\"".get_string("delete")."\" href=\"delete.php?id=$course->id\"><img".
" src=\"$pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("delete")."\"></a> ";
}
// checks whether user can change visibility
if (has_capability('moodle/course:visibility', $coursecontext)) {
if (!empty($course->visible)) {
echo "<a title=\"".get_string("hide")."\" href=\"search.php?search=$encodedsearch&amp;perpage=$perpage&amp;page=$page&amp;hide=$course->id&amp;sesskey=$USER->sesskey\"><img".
" src=\"$pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("hide")."\"></a> ";
} else {
echo "<a title=\"".get_string("show")."\" href=\"search.php?search=$encodedsearch&amp;perpage=$perpage&amp;page=$page&amp;show=$course->id&amp;sesskey=$USER->sesskey\"><img".
" src=\"$pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("show")."\"></a> ";
}
}
// checks whether user can do site backup
if (has_capability('moodle/site:backup', $coursecontext)) {
echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\"><img".
" src=\"$pixpath/t/backup.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/backup.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("backup")."\"></a> ";
}
// checks whether user can do restore
if (has_capability('moodle/site:restore', $coursecontext)) {
echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&wdir=/backupdata\"><img".
" src=\"$pixpath/t/restore.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
" src=\"$pixpath/t/restore.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"".get_string("restore")."\"></a> ";
}
echo "</td></tr>";

View File

@ -140,7 +140,7 @@
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/user.php?id='.$course->id.'&user='.$user->id.'&mode=outline');
}
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.STATS_MODE_DETAILED.'&course='.$course->id.'&time='.$time.'&report='.STATS_REPORT_USER_VIEW.'&userid='.$user->id.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.STATS_MODE_DETAILED.'&course='.$course->id.'&time='.$time.'&report='.STATS_REPORT_USER_VIEW.'&userid='.$user->id.'" alt="'.get_string('statisticsgraph').'" /></center>';
// What the heck is this about? -- MD
$stats = stats_fix_zeros($stats,$param->timeafter,$param->table,(!empty($param->line2)),(!empty($param->line3)));

View File

@ -260,6 +260,7 @@ $string['courseinfo'] = 'Course info';
$string['coursemessage'] = 'Message course users';
$string['coursenotaccessible'] = 'This course does not allow public access';
$string['courseoverview'] = 'Course overview';
$string['courseoverviewgraph'] = 'Course overview graph';
$string['coursereject'] = 'Reject a course request';
$string['courserejected'] = 'Course has been rejected and the requester has been notified.';
$string['courserejectemail'] = 'Sorry, but the course you requested has been rejected. Here is the reason provided:
@ -1239,6 +1240,7 @@ $string['startdate'] = 'Course start date';
$string['startsignup'] = 'Create new account';
$string['state'] = 'State/Province';
$string['statistics'] = 'Statistics';
$string['statisticsgraph'] = 'Statistics graph';
$string['stats'] = 'Statistics';
$string['statslogins'] = 'Logins';
$string['statsmodedetailed'] = 'Detailed (user) view';