Skip to content

Commit 379acad

Browse files
committed
Make student mastery outcome groups accessible
Fixes CNVS-14008 Test Plan: 1) Create a course and add a student 2) Turn on the Student Mastery Gradebook feature 3) Add at least 2 outcome groups each with at least 2 outcomes 4) Masquerade as the student, and visit the Learning Mastery grades tab 5) Verify with screenreader that outcome groups are clearly clickable Change-Id: Ib9773d8275c7adb13783ee6b0acac551b59fc09b Reviewed-on: https://gerrit.instructure.com/37702 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Joel Hough <joel@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com> Product-Review: Matthew Wheeler <mwheeler@instructure.com>
1 parent 7058e24 commit 379acad

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

app/coffeescripts/views/grade_summary/GroupView.coffee

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ define [
1616

1717
events:
1818
'click .group-description': 'expand'
19+
'keyclick .group-description': 'expand'
1920

2021
template: template
2122

@@ -27,7 +28,12 @@ define [
2728
itemView: OutcomeView
2829
outcomesView.render()
2930

30-
expand: -> @$el.toggleClass('expanded')
31+
expand: ->
32+
@$el.toggleClass('expanded')
33+
if @$el.hasClass("expanded")
34+
@$el.children("div.group-description").attr("aria-expanded", "true")
35+
else
36+
@$el.children("div.group-description").attr("aria-expanded", "false")
3137

3238
statusTooltip: ->
3339
switch @model.status()

app/views/jst/grade_summary/group.handlebars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="group-description">
1+
<div class="group-description" role='button' tabindex='0' aria-controls="group_detail-{{id}}" aria-expanded='false'>
22
<div class="outcome-icon {{status}}" data-tooltip title="{{statusTooltip}}" aria-label="Outcome Group: {{title}} status is {{statusTooltip}}">
33
{{#if started}}
44
{{#ifEqual status 'mastery'}}
@@ -14,10 +14,10 @@
1414
<i class="icon-empty"></i>
1515
{{/if}}
1616
</div>
17-
<h3 class="group-title">{{title}}</h3>
17+
<h3 class="group-title"><span role='button' tabindex='0'>{{title}}</span></h3>
1818
<div class="group-status" aria-label="{{mastery_count}} out of {{count}} outcomes mastered">
1919
<strong>{{mastery_count}}</strong>/{{count}} <span>Outcomes</span>
2020
</div>
2121
</div>
22-
<div class="outcomes">
22+
<div id="group_detail-{{id}}" class="outcomes">
2323
</div>

0 commit comments

Comments
 (0)