From afc54475a866c3b914b2caba94ee9cce9f394f2b Mon Sep 17 00:00:00 2001 From: David Monllao Date: Tue, 4 Sep 2012 15:59:07 +0800 Subject: [PATCH] MDL-30847 core Adding ARIA attribute to help windows --- lib/javascript-static.js | 1 + lib/outputrenderers.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 1cf2c8656b8..8e562713f5b 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1376,6 +1376,7 @@ M.util.help_icon = { }, display_callback : function(content) { + content = '
' + content + '
'; this.overlay.set('bodyContent', content); }, diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index e29abd16493..f51c5d4aa09 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1617,7 +1617,7 @@ class core_renderer extends renderer_base { // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip $title = get_string('helpprefix2', '', trim($helpicon->title, ". \t")); - $attributes = array('href'=>$url, 'title'=>$title); + $attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true'); $id = html_writer::random_id('helpicon'); $attributes['id'] = $id; $output = html_writer::tag('a', $output, $attributes); @@ -1681,7 +1681,7 @@ class core_renderer extends renderer_base { // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip $title = get_string('helpprefix2', '', trim($title, ". \t")); - $attributes = array('href'=>$url, 'title'=>$title); + $attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true'); $id = html_writer::random_id('helpicon'); $attributes['id'] = $id; $output = html_writer::tag('a', $output, $attributes);