Skip to content

Commit

Permalink
Merge pull request #1385 from adaptlearning/issue/1384
Browse files Browse the repository at this point in the history
Adds a 'text-to-speech' class when _isTextProcessorEnabled is true
  • Loading branch information
moloko authored Jan 19, 2017
2 parents b533cb6 + c837aac commit 186056f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/js/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ define(function(require) {

// Check if accessibility is active
if (this.isActive()) {

this.setupDocument();
this.setupLegacy();
this.setupPopupListeners();
Expand Down Expand Up @@ -315,6 +314,11 @@ define(function(require) {

setupDocument: function() {
this.$html.addClass('accessibility');

if (Adapt.config.get('_accessibility')._isTextProcessorEnabled) {
this.$html.addClass('text-to-speech');
}

$.a11y(true)
$.a11y_on(true, "body > *");
},
Expand Down Expand Up @@ -374,7 +378,7 @@ define(function(require) {


revertDocument: function() {
this.$html.removeClass('accessibility');
this.$html.removeClass('accessibility text-to-speech');
$.a11y(false);
$.a11y_on(false, "body > *");
$.a11y_on(true, "#accessibility-toggle");
Expand Down

0 comments on commit 186056f

Please sign in to comment.