]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7434 all images that convey information should have alt text to convey that infor...
authorskodak <skodak>
Sun, 26 Nov 2006 16:20:19 +0000 (16:20 +0000)
committerskodak <skodak>
Sun, 26 Nov 2006 16:20:19 +0000 (16:20 +0000)
15 files changed:
lang/en_utf8/survey.php
mod/data/field/picture/field.class.php
mod/data/preset.php
mod/exercise/lib.php
mod/glossary/comments.php
mod/glossary/config.html
mod/glossary/lib.php
mod/glossary/view.php
mod/hotpot/index.php
mod/resource/type/directory/resource.class.php
mod/resource/type/repository/repository.html
mod/scorm/lib.php
mod/survey/lib.php
mod/workshop/locallib.php
mod/workshop/submissions.php

index 68fe78425852b6cdc33969181fbf036278afc02d..e0ba38f3c057428b6c1e5c2afb7838d81c11db15 100644 (file)
@@ -203,6 +203,7 @@ $string['survey:download'] = 'Download responses';
 $string['survey:participate'] = 'Respond to survey';
 $string['survey:readresponses'] = 'View responses';
 $string['surveycompleted'] = 'You\'ve completed this survey.  The graph below shows a summary of your results compared to the class averages.';
+$string['surveygraph'] = 'Survey graph';
 $string['surveyname'] = 'Survey name';
 $string['surveysaved'] = 'Survey saved';
 $string['surveytype'] = 'Survey type';
index f79efff528e5254aba2a8b289032bb40e11f6f51..9f3a568a7fda8447cdf9fcdd78bd733007f4de2e 100755 (executable)
@@ -64,7 +64,7 @@ class data_field_picture extends data_field_file {
                 .$this->field->id.'_filename" id="field_'.$this->field->id.'_filename" value="'.$description.'" /><br />';
         $str .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.$this->field->param3.'" />';
         if ($filepath){
-            $str .= '<img width="'.$this->previewwidth.'" height="'.$this->previewheight.'" src="'.$filepath.'" />';
+            $str .= '<img width="'.$this->previewwidth.'" height="'.$this->previewheight.'" src="'.$filepath.'" alt="" />';
         }
         $str .= '</div>';
         return $str;
index 223fd132782d70701dd1a9c6481777bc0d2507a4..1ebc1651ffc82e6699c40712fa11bafb28bb28a1 100644 (file)
@@ -316,7 +316,7 @@ foreach ($presets as $id => $preset) {
     echo '<tr>';
     echo '<td>';
     if (!empty($preset->screenshot)) {
-        echo '<img width="150" class="presetscreenshot" src="'.$preset->screenshot.'" />';
+        echo '<img width="150" class="presetscreenshot" src="'.$preset->screenshot.'" alt="'.get_string('screenshot').'" />';
     }
     echo '</td><td>'.$preset->name;
     if (!empty($preset->userid)) {
index 1714081c729a1959fe00dc8fbec1460e772ff34c..cf3285e173cbd5482fb79e1e9eb18745acf4511b 100644 (file)
@@ -773,7 +773,7 @@ function exercise_print_submission_title($exercise, $submission) {
             } else {
                 $ffurl = "file.php?file=/$filearea/$file";
             }
-            return "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"File\" />".
+            return "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"".get_string('file')."\" />".
                 "&nbsp;<a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$submission->title</a>";
         }
     }
index 4deba4a19fdc2770cdf42e4122dde360579aedd1..f2744869986efc75b221e090f8d2a4f39ab833f4 100644 (file)
@@ -58,7 +58,7 @@
     print_heading(format_string(get_string('commentson','glossary')." <b>\"$entry->concept\"</b>"));
 
     if ($glossary->allowcomments || has_capability('mod/glossary:managecomments', $context)) {
-        print_heading("<a href=\"comment.php?action=add&amp;eid=$entry->id\">$straddcomment</a> <img title=\"$straddcomment\" src=\"comment.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" />");
+        print_heading("<a href=\"comment.php?action=add&amp;eid=$entry->id\">$straddcomment <img title=\"$straddcomment\" src=\"comment.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"$straddcomment\" /></a>");
     }
 
     if ($comments = get_records("glossary_comments","entryid",$entry->id,"timemodified ASC")) {
index 0f371a31ec05155b9a748de78d5a02908346404e..9c539429d00d1ee32fea0707fe1951811f0f111d 100644 (file)
         $recformat = get_record('glossary_formats','id',$formatid);
         echo '<tr>';
         echo '<td>' . $formatname . '</td>';
-        $eicon = "<a title=\"" . get_string("edit") . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\"><img border=\"0\" src=\"../pix/t/edit.gif\" alt=\"\" /></a>";
+        $eicon = "<a title=\"" . get_string("edit") . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\"><img border=\"0\" src=\"../pix/t/edit.gif\" alt=\"".get_string("edit")."\" /></a>";
         if ( $recformat->visible ) {
             $vtitle = get_string("hide");
             $vicon = "hide.gif";
             $vtitle = get_string("show");
             $vicon = "show.gif";
         }
-        $vicon = "<a title=\"" . $vtitle . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\"><img border=\"0\" src=\"../pix/t/" . $vicon . "\" alt=\"\" /></a>";
+        $vicon = "<a title=\"" . $vtitle . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\"><img border=\"0\" src=\"../pix/t/" . $vicon . "\" alt=\"$vtitle\" /></a>";
 
         echo '<td align="center" nowrap="nowrap">' . $eicon . '&nbsp;&nbsp;' . $vicon . '</td>';
         echo '</tr>';
index 3fe3caa96baf68b83c64b2a773ab3ca0b1436198..a06097a5df545daff628abade112c49b561b8147 100644 (file)
@@ -814,9 +814,9 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
             $output = true;
             $return .= " <a title=\"" . get_string("delete") . "\" href=\"deleteentry.php?id=$cm->id&amp;mode=delete&amp;entry=$entry->id&amp;prevmode=$mode&amp;hook=$hook\"><img src=\"";
             $return .= $icon;
-            $return .= "\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a> ";
+            $return .= "\" height=\"11\" width=\"11\" border=\"0\" alt=\"" . get_string("delete") . "\" /></a> ";
 
-            $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?id=$cm->id&amp;e=$entry->id&amp;mode=$mode&amp;hook=$hook\"><img src=\"$CFG->pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /></a>";
+            $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?id=$cm->id&amp;e=$entry->id&amp;mode=$mode&amp;hook=$hook\"><img src=\"$CFG->pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"" . get_string("edit") . "\" /></a>";
         } elseif ( $importedentry ) {
             $return .= " <font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
         }
@@ -910,7 +910,7 @@ function  glossary_print_entry_approval($cm, $entry, $mode,$align="right",$insid
         if ($insidetable) {
             echo '<table class="glossaryapproval" align="'.$align.'"><tr><td align="'.$align.'">';
         }
-        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?id='.$cm->id.'&amp;eid='.$entry->id.'&amp;mode='.$mode.'"><img align="'.$align.'" src="check.gif" border="0" width="34" height="34" alt="" /></a>';
+        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?id='.$cm->id.'&amp;eid='.$entry->id.'&amp;mode='.$mode.'"><img align="'.$align.'" src="check.gif" border="0" width="34" height="34" alt="'.get_string('approve','glossary').'" /></a>';
         if ($insidetable) {
             echo '</td></tr></table>';
         }
index f75815875b4aa1a877a2723041abdb8b5c4ac7f5..6116a65169be0e1553b732ba6663a3cd7ec622dc 100644 (file)
     $printicon = '';
     if ( $isuserframe and $mode != 'search') {
         if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
-            $printicon = " <a title =\"". get_string("printerfriendly","glossary") . "\" alt =\"". get_string("printerfriendly","glossary") . "\" target=\"printview\" href=\"print.php?id=$cm->id&amp;mode=$mode&amp;hook=$hook&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img border=\"0\" src=\"print.gif\" alt=\"\" /></a>";
+            $printicon = " <a title =\"". get_string("printerfriendly","glossary") . "\" alt =\"". get_string("printerfriendly","glossary") . "\" target=\"printview\" href=\"print.php?id=$cm->id&amp;mode=$mode&amp;hook=$hook&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img border=\"0\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
         }
     }
     print_heading(format_string($glossary->name).$printicon);
index 3ff0c2d0197ff3a5d831521cfb4f80b479bb06f1..3be9cd0af4544a9e58e443c5b68f0d1907661bc6 100644 (file)
                     // Show the zoom boxes
                     if ($displaysection==$hotpot->section) {
                         $strshowall = get_string('showall'.$course->format);
-                        $printsection .= '<br /><a href="index.php?id='.$course->id.'&section=all" title="'.$strshowall.'"><img src="'.$CFG->pixpath.'/i/all.gif" height=25 width=16 border=0></a><br />';
+                        $printsection .= '<br /><a href="index.php?id='.$course->id.'&section=all" title="'.$strshowall.'"><img src="'.$CFG->pixpath.'/i/all.gif" height=25 width=16 border=0 alt="'.$strshowall.'"></a><br />';
                     } else {
                         $strshowone = get_string('showonly'.preg_replace('|s$|', '', $course->format, 1), '', $hotpot->section);
-                        $printsection .=  '<br /><a href="index.php?id='.$course->id.'&section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$CFG->pixpath.'/i/one.gif" height=16 width=16 border=0></a><br />';
+                        $printsection .=  '<br /><a href="index.php?id='.$course->id.'&section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$CFG->pixpath.'/i/one.gif" height=16 width=16 border=0 alt="'.$strshowone.'"></a><br />';
                     }
                 }
             }
index 8b9e6e23d481541fca9fedc84d9f0f7a91aa661a..a880f783b1e2c55a69026f883d695499195c38cd 100644 (file)
@@ -95,9 +95,11 @@ function display() {
     $strname = get_string("name");
     $strsize = get_string("size");
     $strmodified = get_string("modified");
+    $strfolder = get_string("folder");
+    $strfile = get_string("file");
 
     echo '<table cellpadding="4" cellspacing="1" class="files">';
-    echo "<tr><th colspan=\"2\" class=\"header name\">$strname</th>".
+    echo "<tr><th class=\"header name\">$strname</th>".
          "<th align=\"right\" colspan=\"2\" class=\"header size\">$strsize</th>".
          "<th align=\"right\" class=\"header date\">$strmodified</th>".
          "</tr>";
@@ -119,17 +121,14 @@ function display() {
         }
 
         if ($icon == 'folder.gif') {
-            echo '<tr class="folder"><td>';
-            echo "<img src=\"$CFG->pixpath/f/$icon\" width=\"16\" height=\"16\" alt=\"\"/>";
-            echo '</td>';
+            echo '<tr class="folder">';
             echo '<td nowrap="nowrap" class="name">';
-            echo "<a href=\"view.php?id={$cm->id}&amp;subdir=$subdir/$file\">$file</a>";
+            echo "<a href=\"view.php?id={$cm->id}&amp;subdir=$subdir/$file\">";
+            echo "<img src=\"$CFG->pixpath/f/$icon\" width=\"16\" height=\"16\" alt=\"$strfolder\" />&nbsp;$file</a>";
         } else {
-            echo '<tr class="file"><td>';
-            echo "<img src=\"$CFG->pixpath/f/$icon\" width=\"16\" height=\"16\" alt=\"\"/>";
-            echo '</td>';
+            echo '<tr class="file">';
             echo '<td nowrap="nowrap" class="name">';
-            link_to_popup_window($relativeurl, "resourcedirectory{$resource->id}", "$file", 450, 600, '');
+            link_to_popup_window($relativeurl, "resourcedirectory{$resource->id}", "<img src=\"$CFG->pixpath/f/$icon\" width=\"16\" height=\"16\" alt=\"$strfile\" />&nbsp;$file", 450, 600, '');
         }
         echo '</td>';
         echo '<td>&nbsp;</td>';
index d32cd7ac5bc6e145453a185b98ea9d8fccf87f9a..bb4ba8619aa1dfa334c78a7ff0490fc223e8fb29 100644 (file)
@@ -41,7 +41,7 @@
     </tr>
     <tr valign="top">
     <td align="right" nowrap="nowrap">
-    <img src="<?php echo $CFG->wwwroot.'/mod/resource/type/repository/hive/hp-footer-hive-powered.gif' ?>" align="top" />
+    <img src="<?php echo $CFG->wwwroot.'/mod/resource/type/repository/hive/hp-footer-hive-powered.gif' ?>" align="top" alt="" />
     </td>
     <td>
     <?php
index 0bd0b5dd1fef596cde3c0293e0d77b8a61cdd073..cb1511d47070111e5e127a22dafc508c7eb76558 100755 (executable)
@@ -258,7 +258,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
                     if (($nextsco !== false) && ($sco->parent != $nextsco->parent) && (($level==0) || (($level>0) && ($nextsco->parent == $sco->identifier)))) {
                         $sublist++;
                     } else {
-                        $report .= '<img src="'.$scormpixdir.'/spacer.gif" />';
+                        $report .= '<img src="'.$scormpixdir.'/spacer.gif" alt="" />';
                     }
 
                     if ($sco->launch) {
index 11dd4d99cc588ce124f954ebf17dfa74cada6909..ca97800079ffd98bbfe29cbe01a9e217e834ea55 100644 (file)
@@ -487,7 +487,7 @@ function survey_print_graph($url) {
 
     } else {
         echo "<img height=\"$SURVEY_GHEIGHT\" width=\"$SURVEY_GWIDTH\" border=\"1\"".
-             " src=\"$CFG->wwwroot/mod/survey/graph.php?$url\" alt=\"\" />";
+             " src=\"$CFG->wwwroot/mod/survey/graph.php?$url\" alt=\"".get_string("surveygraph", "survey")."\" />";
     }
 }
 
index 5a5a9bf683c6a634eb07b06e94c894d906df73d8..4a9a134b9da1a8a16be93eb9a0dd6e6f676edfe6 100644 (file)
@@ -2864,7 +2864,7 @@ function workshop_print_submission($workshop, $submission) {
                     }
                     echo "<tr><td><b>".get_string("attachment", "workshop")." $n:</b> \n";
                     echo "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" 
-                        border=\"0\" alt=\"File\" />".
+                        border=\"0\" alt=\"".get_string('file')."\" />".
                         "&nbsp;<a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>";
                     $n++;
                 }
index 4fec04cad89f6b36fc19dd6fecb0db0484816a26..9e6ccc1aa435bdd2671f3bf109baa5553102ba48 100644 (file)
                             $ffurl = "file.php?file=/$filearea/$file";
                         }
                         echo "<tr><td>".get_string("attachment", "workshop")." $n: <img src=\"$CFG->pixpath/f/$icon\"
-                            height=\"16\" width=\"16\" border=\"0\" alt=\"File\" />".
+                            height=\"16\" width=\"16\" border=\"0\" alt=\"".get_string('file')."\" />".
                             "&nbsp;<a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>\n";
                     }
                 } else {