From 749909b8ff1f1555e1af2f992abe6b44b2702d75 Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Thu, 5 Jan 2017 11:55:15 -0500 Subject: [PATCH] Remove unused a11y functionality for prev/next buttons --- .../xmodule/js/src/sequence/display.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/sequence/display.js b/common/lib/xmodule/xmodule/js/src/sequence/display.js index e914595b3b..802b96dcac 100644 --- a/common/lib/xmodule/xmodule/js/src/sequence/display.js +++ b/common/lib/xmodule/xmodule/js/src/sequence/display.js @@ -100,16 +100,14 @@ * 'problem_id' is problem id. * 'new_content_state' is the updated content of the problem. * 'new_state' is the updated state of the problem. - * initialize for the current sequence if there isn't any updated problem - * for this position. */ + // initialize for the current sequence if there isn't any updated problem for this position. if (!this.anyUpdatedProblems(this.position)) { this.updatedProblems[this.position] = {}; } // Now, put problem content and score against problem id for current active sequence. - this.updatedProblems[this.position][problemId] = [newContentState, newState]; }; @@ -133,19 +131,10 @@ this.$(buttonClass).addClass('disabled').attr('disabled', true); }; - Sequence.prototype.setButtonLabel = function(buttonClass, buttonLabel) { - this.$(buttonClass + ' .sr').html(buttonLabel); - }; - - Sequence.prototype.updateButtonState = function( - buttonClass, buttonAction, actionLabelPrefix, isAtBoundary, boundaryUrl - ) { - var buttonLabel; + Sequence.prototype.updateButtonState = function(buttonClass, buttonAction, isAtBoundary, boundaryUrl) { if (isAtBoundary && boundaryUrl === 'None') { this.disableButton(buttonClass); } else { - buttonLabel = actionLabelPrefix + (isAtBoundary ? ' Subsection' : ' Unit'); - this.setButtonLabel(buttonClass, buttonLabel); this.enableButton(buttonClass, buttonAction); } }; @@ -158,13 +147,13 @@ // previous button isFirstTab = this.position === 1; previousButtonClass = '.sequence-nav-button.button-previous'; - this.updateButtonState(previousButtonClass, this.selectPrevious, 'Previous', isFirstTab, this.prevUrl); + this.updateButtonState(previousButtonClass, this.selectPrevious, isFirstTab, this.prevUrl); // next button // use inequality in case contents.length is 0 and position is 1. isLastTab = this.position >= this.contents.length; nextButtonClass = '.sequence-nav-button.button-next'; - this.updateButtonState(nextButtonClass, this.selectNext, 'Next', isLastTab, this.nextUrl); + this.updateButtonState(nextButtonClass, this.selectNext, isLastTab, this.nextUrl); }; Sequence.prototype.render = function(newPosition) {