set focus for assignment muter dialogs

fixes CNVS-10555

test plan:
 In screenreader gradebook and gradebook2
  - open the assignment muter dialog
  - focus should be on the content of the dialog

Change-Id: Id4972ebef2f9a496b984bd0e799172844ffbb158
Reviewed-on: https://gerrit.instructure.com/29309
Reviewed-by: Matthew Irish <mirish@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
This commit is contained in:
Cameron Sutter 2014-01-24 16:24:46 -07:00
parent 2d5ca8af7c
commit 7ce30222bd
2 changed files with 26 additions and 23 deletions

View File

@ -27,6 +27,7 @@ define [
click: =>
@$dialog.disableWhileLoading $.ajaxJSON(@url, 'put', { status : true }, @afterUpdate)
}]
open: => setTimeout (=> @$dialog.find('#assignment_muter_content').focus()), 100
close: => @$dialog.remove()
resizable: false
width: 400

View File

@ -1,25 +1,27 @@
<div title="{{#t "mute_assignment"}}Mute Assignment{{/t}}">
<p>
{{#t "sure_you_want_to_mute"}}
Are you sure you want to mute this assignment? While this assignment
is muted, students will not receive new notifications about or be
able to see:
{{/t}}
</p>
<ul>
<li>{{#t "see_grade"}}Their grade for the assignment{{/t}}</li>
<li>{{#t "grade_change_notifications"}}Grade change notifications{{/t}}</li>
<li>{{#t "submission_comments"}}Submission comments{{/t}}</li>
<li>{{#t "curving_assignments"}}Curving assignments{{/t}}</li>
<li>{{#t "score_change_notifications"}}Score change notifications{{/t}}</li>
</ul>
<p>
{{#t "students_will_see"}}Students will be able to see that this assignment is muted.{{/t}}
</p>
<p>
{{#t "how_to_unmute"}}
Once you have muted this assignment, you can begin sending
notifications again by clicking the "Unmute Assignment" link.
{{/t}}
</p>
<div id="assignment_muter_content" tabindex="-1">
<p>
{{#t "sure_you_want_to_mute"}}
Are you sure you want to mute this assignment? While this assignment
is muted, students will not receive new notifications about or be
able to see:
{{/t}}
</p>
<ul>
<li>{{#t "see_grade"}}Their grade for the assignment{{/t}}</li>
<li>{{#t "grade_change_notifications"}}Grade change notifications{{/t}}</li>
<li>{{#t "submission_comments"}}Submission comments{{/t}}</li>
<li>{{#t "curving_assignments"}}Curving assignments{{/t}}</li>
<li>{{#t "score_change_notifications"}}Score change notifications{{/t}}</li>
</ul>
<p>
{{#t "students_will_see"}}Students will be able to see that this assignment is muted.{{/t}}
</p>
<p>
{{#t "how_to_unmute"}}
Once you have muted this assignment, you can begin sending
notifications again by clicking the "Unmute Assignment" link.
{{/t}}
</p>
</div>
</div>