Commit 260c19e3 by Anjali Pal

Duplicates the value in the cell for the aria label.

This is a temporary fix until we add a key to the table and switch to using aria-describedby
parent 130f9698
......@@ -197,15 +197,15 @@ define(function (require) {
expect($tr.children('td.discussion_contributions'))
.toHaveClass('learner-cell-rank-bottom');
expect($tr.children('td.discussion_contributions ')).toHaveAttr('aria-label', 'low');
expect($tr.children('td.discussion_contributions ')).toHaveAttr('aria-label', '10 low');
expect($tr.find('td.problems_completed'))
.toHaveClass('learner-cell-rank-middle');
expect($tr.find('td.problems_attempted'))
.toHaveClass('learner-cell-rank-top');
expect($tr.find('td.problems_attempted')).toHaveAttr('aria-label', 'high');
expect($tr.find('td.problems_attempted')).toHaveAttr('aria-label', '100 high');
expect($tr.find('td.problem_attempts_per_completed'))
.toHaveClass('learner-cell-rank-top');
expect($tr.find('td.problem_attempts_per_completed')).toHaveAttr('aria-label', 'high');
expect($tr.find('td.problem_attempts_per_completed')).toHaveAttr('aria-label', '1.56 high');
expect($tr.find('td.videos_viewed'))
.toHaveClass('learner-cell-rank-middle');
});
......
......@@ -57,9 +57,9 @@ define(function (require) {
if (engagementCategory) {
this.$el.addClass(this.enagementCategoryToClass[engagementCategory]);
if (engagementCategory === 'classRankTop') {
this.$el.attr('aria-label', 'high');
this.$el.attr('aria-label', value + ' high');
} else if (engagementCategory === 'classRankBottom') {
this.$el.attr('aria-label', 'low');
this.$el.attr('aria-label', value + ' low');
}
}
return Backgrid.Cell.prototype.render.apply(this, arguments);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment