add aria-label to dropped assignments. fixes #9253

on the student grade summary page, notify users using
screen readers of assignments that will be dropped.

test plan:
  * as a student using a screen reader, navigate to a
    course grade summary page that has dropped assignments;
  * navigate to the points column of a dropped assignment and
    verify that a notice that the assignment will not be
    considered in the final calculation is read.

Change-Id: Iad2bb9ef60bf14cfc39dbab0867592fd34a6761a
Reviewed-on: https://gerrit.instructure.com/14017
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
This commit is contained in:
Zach Pendleton 2012-09-27 17:08:01 -06:00
parent 30d3cf7c83
commit 0dfff81712
1 changed files with 4 additions and 1 deletions

View File

@ -86,6 +86,7 @@ define([
setGroupData(groups, $(this));
});
$submissions.removeClass('dropped');
$submissions.find('.points_possible').attr('aria-label', '');
$submissions.each(function() {
var $submission = $(this),
submission;
@ -93,7 +94,9 @@ define([
var data = $submission.getTemplateData({textValues: ['assignment_group_id', 'score', 'points_possible', 'assignment_id']});
if((!data.score || isNaN(parseFloat(data.score))) && ignoreUngradedSubmissions) {
$(this).addClass('dropped');
$submission.addClass('dropped')
.find('.points_possible')
.attr('aria-label', I18n.t('titles.dropped_assignment_no_total', 'This assignment will not be considered in the total calculation'));
return;
}
var groupData = groups[data.assignment_group_id];