]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7948 some more messaging accessiblity fixes
authorskodak <skodak>
Sat, 30 Dec 2006 11:20:26 +0000 (11:20 +0000)
committerskodak <skodak>
Sat, 30 Dec 2006 11:20:26 +0000 (11:20 +0000)
message/discussion.php
message/lib.php

index e32394c731c15710033b938cf982e32ec4c64a92..3c7bc06257ced6dd9820fb550ac36ebb54ecd21d 100644 (file)
     if (empty($allmessages)) {
         echo get_string('nomessagesfound', 'message');
     } else {
+        echo '<ul class="messagelist">';
         foreach ($allmessages as $message) {
+            echo '<li>';
             echo $message;
+            echo '</li>';
         }
+        echo '</ul>';
         if ($playbeep and get_user_preferences('message_beepnewmessage', 0)) {
             echo '<embed src="bell.wav" autostart="true" hidden="true" name="bell" />';
         }
index 04b3672bc1baea1cd623fc205c0609e1dac44f68..f5498f4bf2e6ea130a2a423400882e7dbdf65f07 100644 (file)
@@ -586,6 +586,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
 
     $command = $linktype.'contact';
     $string  = $str->{$command};
+    $alttext = $text ? '' : $string; 
     $text = $text ? '&nbsp;'.$string : '';
 
     switch ($linktype) {
@@ -606,7 +607,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
     $output = '<span class="'.$linktype.'">'.
               '<a href="'.$script.'&amp;'.$command.'='.$userid.
               '&amp;sesskey='.sesskey().'" title="'.s($string).'">'.
-              '<img src="'.$CFG->pixpath.$icon.'" height="11" width="11" border="0" alt="'.s($string).'" />'.
+              '<img src="'.$CFG->pixpath.$icon.'" height="11" width="11" border="0" alt="'.s($alttext).'" />'.
               $text.'</a></span>';
 
     if ($return) {
@@ -639,7 +640,7 @@ function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords=
     if ($linktext == 'icon') {  // Icon only
         $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'" />';
     } else if ($linktext == 'both') {  // Icon and standard name
-        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'" />';
+        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="" />';
         $fulllink .= '&nbsp;'.$strmessagehistory;
     } else if ($linktext) {    // Custom name
         $fulllink = $linktext;