Permalink
Browse files

MDL-30847 core Adding ARIA attribute to help windows

  • Loading branch information...
1 parent c8ac480 commit 683bed9182581031af4d05c96934b59b32077c68 @dmonllao dmonllao committed Sep 4, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/javascript-static.js
  2. +2 −2 lib/outputrenderers.php
View
1 lib/javascript-static.js
@@ -1445,6 +1445,7 @@ M.util.help_icon = {
},
display_callback : function(content) {
+ content = '<div role="alert">' + content + '</div>';
this.overlay.set('bodyContent', content);
},
View
4 lib/outputrenderers.php
@@ -1746,7 +1746,7 @@ protected function render_old_help_icon(old_help_icon $helpicon) {
// 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);
@@ -1811,7 +1811,7 @@ protected function render_help_icon(help_icon $helpicon) {
// 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);

0 comments on commit 683bed9

Please sign in to comment.