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

@ -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)));