]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes MDL-12029 "Glossary view needs heading markup + other accessibility fixes".
authornfreear <nfreear>
Mon, 5 Nov 2007 15:22:22 +0000 (15:22 +0000)
committernfreear <nfreear>
Mon, 5 Nov 2007 15:22:22 +0000 (15:22 +0000)
mod/glossary/formats/encyclopedia/encyclopedia_format.php
mod/glossary/formats/faq/faq_format.php
mod/glossary/lib.php
mod/glossary/view.php
theme/standard/styles_fonts.css

index 22e4fcd1db837fcda6fd039285c9702112ca03d6..e46ce0280fe62a45547783faa58b2809bcf53dc6 100644 (file)
@@ -16,17 +16,17 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
         print_user_picture($user->id, $course->id, $user->picture);
     
         echo '</td>';
-        echo '<td class="entryheader">';
+        echo '<th class="entryheader">';
         echo '<span class="concept">';
         glossary_print_entry_concept($entry);
-        echo '</span><br />';
+        echo '</span>';
 
         $fullname = fullname($user);
         $by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
         $by->date = userdate($entry->timemodified);
         echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';
 
-        echo '</td>';
+        echo '</th>';
         
         echo '<td class="entryapproval">';
         glossary_print_entry_approval($cm, $entry, $mode);
index 7069ca4d63eaada2f77716b58d4a04a629b84033..b4ed5cc7066b814079c9a779adf6e21c6eda5d22 100644 (file)
@@ -8,16 +8,16 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hoo
         echo '<table class="glossarypost faq" cellspacing="0">';
 
         echo '<tr valign="top">';
-        echo '<td class="entryheader">';
+        echo '<th class="entryheader">';
         $entry->course = $course->id;
 
         echo '<span class="concept">' . get_string('question','glossary') . ': ';
         glossary_print_entry_concept($entry);
-        echo '</span><br />';
+        echo '</span>';
 
         echo '<span class="time">('.get_string('lastedited').': '.
              userdate($entry->timemodified).')</span>';
-        echo '</td>';
+        echo '</th>';
         echo '<td class="entryattachment">';
 
         glossary_print_entry_approval($cm, $entry, $mode);
index 512756dd4c8ba9303b97ee40b28a535e7e46f0c1..fe100d0f9f182fcb12d1adfc8b812726be121885 100644 (file)
@@ -639,7 +639,7 @@ function glossary_print_entry($course, $cm, $glossary, $entry, $mode='',$hook=''
 
  //Default (old) print format used if custom function doesn't exist in format
 function glossary_print_entry_default ($entry) {
-    echo '<b>'. strip_tags($entry->concept) . ': </b>';
+    echo '<h3>'. strip_tags($entry->concept) . ': </h3>';
 
     $definition = $entry->definition;
 
@@ -671,7 +671,7 @@ function glossary_print_entry_default ($entry) {
 function  glossary_print_entry_concept($entry) {
     $options = new object();
     $options->para = false;
-    $text = format_text('<span class="nolink">' . $entry->concept . '</span>', FORMAT_MOODLE, $options);
+    $text = format_text('<h3 class="nolink">' . $entry->concept . '</h3>', FORMAT_MOODLE, $options);
     if (!empty($entry->highlight)) {
         $text = highlight($entry->highlight, $text);
     }
@@ -839,6 +839,8 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
 
 
     $return = '<span class="commands">';
+    // Differentiate links for each entry.
+    $altsuffix = ': '.$entry->concept;
     if (!$entry->approved) {
         $output = true;
         $return .= get_string('entryishidden','glossary');
@@ -847,7 +849,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
 
     if (has_capability('mod/glossary:comment', $context) and $glossary->allowcomments) {
         $output = true;
-        $return .= ' <a title="' . get_string('addcomment','glossary') . '" href="comment.php?action=add&amp;eid='.$entry->id.'"><img src="comment.gif" class="iconsmall" alt="'.get_string('addcomment','glossary').'" /></a>';
+        $return .= ' <a title="' . get_string('addcomment','glossary') . '" href="comment.php?action=add&amp;eid='.$entry->id.'"><img src="comment.gif" class="iconsmall" alt="'.get_string('addcomment','glossary').$altsuffix.'" /></a>';
     }
 
 
@@ -857,7 +859,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
             $mainglossary = get_record('glossary','mainglossary',1,'course',$course->id);
             if ( $mainglossary ) {  // if there is a main glossary defined, allow to export the current entry
                 $output = true;
-                $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$cm->id.'&amp;entry='.$entry->id.'&amp;mode='.$mode.'&amp;hook='.$hook.'"><img src="export.gif" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').'" /></a>';
+                $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$cm->id.'&amp;entry='.$entry->id.'&amp;mode='.$mode.'&amp;hook='.$hook.'"><img src="export.gif" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
             }
         }
 
@@ -875,9 +877,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 .= "\" class=\"iconsmall\" alt=\"" . get_string("delete") . "\" /></a> ";
+            $return .= "\" class=\"iconsmall\" alt=\"" . get_string("delete") .$altsuffix."\" /></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\" class=\"iconsmall\" alt=\"" . get_string("edit") . "\" /></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\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
         } elseif ( $importedentry ) {
             $return .= " <font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
         }
index e807ef08e0022ae6f16c69d005e223ae9416683c..bac4bad575decc1dec5b94363d5210b37c6ef1da 100644 (file)
         } else {
             $fullsearchchecked = '';
         }
-        echo '<input type="checkbox" name="fullsearch" value="1" '.$fullsearchchecked.' alt="'.$strsearchindefinition.'" />';
+        echo '<input type="checkbox" name="fullsearch" id="fullsearch" value="1" '.$fullsearchchecked.' />';
         echo '<input type="hidden" name="mode" value="search" />';
         echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
-        echo $strsearchindefinition;
+        echo '<label for="fullsearch">'.$strsearchindefinition.'</label>';
         echo '</td></tr></table>';
 
         echo '</form>';
                         print_user_picture($user->id, $course->id, $user->picture);
                         $pivottoshow = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
                     } else {
-                        echo '<td align="center">';
+                        echo '<t>';
                     }
 
-                    echo "<strong> $pivottoshow</strong>" ;
-                    echo '</td></tr></table></div>';
+                    print_heading($pivottoshow);
+                    echo '</th></tr></table></div>';
 
                 }
             }
index c066026a79e54e7cf962413bc79d2da6f50ffe21..25243fb0d2f8470fd75733e7d2659eda9edd8178 100644 (file)
@@ -734,8 +734,15 @@ body#mod-forum-index .generalbox .cell {
 .glossarypost .time {
   font-size: 0.8em;
 }
-.concept {
-  font-weight: bold;
+.glossarycategoryheader h2 {
+  margin: 0;
+} 
+.glossarypost .concept h3 {
+  margin: 0;
+}
+.glossarypost .entryheader {
+  font-weight: normal;
+  text-align: left;
 }
 .glossarycomment .author {
   font-size: 0.8em;