Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30847 core Adding ARIA attribute to help windows

  • Loading branch information...
commit afc54475a866c3b914b2caba94ee9cce9f394f2b 1 parent 4db3699
@dmonllao dmonllao authored
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
@@ -1376,6 +1376,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
@@ -1617,7 +1617,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);
@@ -1681,7 +1681,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);
Please sign in to comment.
Something went wrong with that request. Please try again.