MDL-35823 - Accessibility - Converted the help popup header from H1 to H2 to improve...
authorJason Fowler <phalacee@gmail.com>
Wed, 30 Jan 2013 01:07:43 +0000 (09:07 +0800)
committerJason Fowler <phalacee@gmail.com>
Fri, 1 Feb 2013 03:01:00 +0000 (11:01 +0800)
help.php
theme/magazine/style/core.css
theme/mymobile/style/core.css

index 390b29e..1f955be 100644 (file)
--- a/help.php
+++ b/help.php
@@ -67,7 +67,13 @@ if ($sm->string_exists($identifier.'_help', $component)) {
     $options->newlines = false;
     $options->overflowdiv = !$ajax;
 
-    echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 1, 'helpheading');
+    if ($ajax) {
+        // When using AJAX, the header should be H2 as it is in the same DOM as the calling page.
+        echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 2, 'helpheading');
+    } else { 
+        // When not using AJAX, the header should be H1 as it is in it's own window.
+        echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 1, 'helpheading');
+    }
     // Should be simple wiki only MDL-21695
     echo format_text(get_string($identifier.'_help', $component), FORMAT_MARKDOWN, $options);
 
index d71f000..20c7d86 100644 (file)
@@ -494,7 +494,7 @@ div.yui3-widget-bd {
     background: none;
 }
 
-div.yui3-widget-bd h1.helpheading {
+div.yui3-widget-bd h2.helpheading {
     font-size: 16px !important;
     font-weight: 800;
     margin-top: 5px;
index b333b1d..575d34c 100644 (file)
@@ -33,7 +33,8 @@ ul {
     color:inherit;
     font-size:inherit;
 }
-h1.helpheading {
+h1.helpheading,
+h2.helpheading {
     font-size: 1.6em;
 }
 /*extra line abve labels and remove padding right for no icon */