From 4df8223cbe92af430cd724f916c4b56bb2bc837b Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Wed, 30 Jan 2013 09:07:43 +0800 Subject: [PATCH] MDL-35823 - Accessibility - Converted the help popup header from H1 to H2 to improve the over all DOM --- help.php | 8 +++++++- theme/magazine/style/core.css | 2 +- theme/mymobile/style/core.css | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/help.php b/help.php index 390b29e9d85ac..1f955bec8db8a 100644 --- a/help.php +++ b/help.php @@ -67,7 +67,13 @@ $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); diff --git a/theme/magazine/style/core.css b/theme/magazine/style/core.css index d71f0007ebc56..20c7d8668771c 100644 --- a/theme/magazine/style/core.css +++ b/theme/magazine/style/core.css @@ -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; diff --git a/theme/mymobile/style/core.css b/theme/mymobile/style/core.css index b333b1d8e8551..575d34c9bbe0c 100644 --- a/theme/mymobile/style/core.css +++ b/theme/mymobile/style/core.css @@ -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 */