|
1 | 1 | {% load i18n %} |
2 | 2 |
|
3 | 3 | <div class="sga-block" data-state="{{ student_state }}" data-max-size="{{ max_file_size }}" |
4 | | - data-staff="{{ is_course_staff }}"> |
| 4 | + data-staff="{{ is_course_staff }}" role="article" aria-describedby="title"> |
5 | 5 | <script type="text/template" id="sga-tmpl"> |
6 | 6 | <% if (display_name) { %> |
7 | | - <b><%= display_name %></b> |
| 7 | + <b id="title"><%= display_name %></b> |
8 | 8 | <% } %> |
9 | 9 | <% if (uploaded) { %> |
10 | | - <p><b>File uploaded</b> |
11 | | - <a href="<%= downloadUrl %>"><%= uploaded.filename %></a></p> |
| 10 | + <br/> |
| 11 | + <label for="file_uploaded"><b>File uploaded</b></label> |
| 12 | + <a href="<%= downloadUrl %>" role="link" id="file_uploaded"><%= uploaded.filename %></a> |
12 | 13 | <% } else { %> |
13 | 14 | <p>No file has been uploaded.</p> |
14 | 15 | <% } %> |
|
18 | 19 | <b>Instructor comment</b> <%= graded.comment %> |
19 | 20 | <% } %> |
20 | 21 | <% if (annotated) { %><br/> |
21 | | - <b>Annotated file from instructor</b> |
22 | | - <a href="<%= annotatedUrl %>"><%= annotated.filename %></a> |
| 22 | + <b id="annotated_file">Annotated file from instructor</b> |
| 23 | + <a href="<%= annotatedUrl %>" aria-describedby="annotated_file"><%= annotated.filename %></a> |
23 | 24 | <% } %> |
24 | 25 | </p> |
25 | 26 | <% } else if (uploaded) { %> |
26 | | - {% trans "This assignment has not yet been graded." %} |
| 27 | + <p>{% trans "This assignment has not yet been graded." %}</p> |
27 | 28 | <% } %> |
28 | 29 | <% if (upload_allowed) { %> |
29 | 30 | <p> |
30 | 31 | <% if (uploaded) { %> |
31 | | - {% trans "Upload a different file" %} |
| 32 | + <span id="upload_label">{% trans "Upload a different file" %}</span> |
32 | 33 | <% } else { %> |
33 | | - {% trans "Upload your assignment" %} |
| 34 | + <span id="upload_label">{% trans "Upload your assignment" %}</span> |
34 | 35 | <% } %> |
35 | | - <div class="upload"> |
| 36 | + <div class="upload" aria-describedby="upload_label" role="alert" aria-live="assertive" tabindex="1"> |
36 | 37 | <input class="fileupload" type="file" name="assignment"/> |
37 | 38 | <button>Select a file</button> |
38 | 39 | </div> |
39 | 40 | </p> |
40 | 41 | <% } %> |
41 | 42 | <% if (error) { %> |
42 | | - <p class="error"><%= error %></p> |
| 43 | + <p class="error" role="alert" aria-live="assertive" tabindex="1"><%= error %></p> |
43 | 44 | <% } %> |
44 | 45 | </script> |
45 | 46 |
|
|
93 | 94 | </td> |
94 | 95 | <td> |
95 | 96 | <% if (assignment.may_grade) { %> |
96 | | - <a class="enter-grade-button button" href="#{{ id }}-enter-grade"> |
| 97 | + <a class="enter-grade-button button" href="#{{ id }}-enter-grade" role="button"> |
97 | 98 | <% if (assignment.needs_approval) { %> |
98 | 99 | {% trans "Approve grade" %} |
99 | 100 | <% } else { %> |
|
103 | 104 | <% } %> |
104 | 105 | </td> |
105 | 106 | <td> |
106 | | - <div class="upload"> |
| 107 | + <div class="upload" aria-live="assertive" role="alert" tabindex="1"> |
107 | 108 | <input class="fileupload" type="file" name="annotated"/> |
108 | 109 | <button>Upload annotated file</button> |
109 | 110 | </div> |
|
114 | 115 | </table> |
115 | 116 | </script> |
116 | 117 |
|
117 | | - <div aria-hidden="true" class="wrap-instructor-info"> |
| 118 | + <div class="wrap-instructor-info"> |
118 | 119 | <a class="instructor-info-action" id="grade-submissions-button" |
119 | 120 | href="#{{ id }}-grade">{% trans "Grade Submissions" %}</a> |
120 | 121 | <a class="instructor-info-action" id="staff-debug-info-button" |
121 | 122 | href="#{{ id }}-debug">{% trans "Staff Debug Info" %}</a> |
122 | 123 | </div> |
123 | 124 |
|
124 | | - <section aria-hidden="true" class="modal staff-modal" id="{{ id }}-grade" style="height: 75%"> |
| 125 | + <section class="modal staff-modal" id="{{ id }}-grade" style="height: 75%"> |
125 | 126 | <div class="inner-wrapper" style="color: black; overflow: auto;"> |
126 | 127 | <header><h2><span class="display_name">{{ display_name }}</span> - {% trans "Staff Graded Assignment" %}</h2></header> |
127 | 128 | <br/> |
|
131 | 132 | </div> |
132 | 133 | </section> |
133 | 134 |
|
134 | | - <section aria-hidden="true" class="modal staff-modal" |
| 135 | + <section class="modal staff-modal" |
135 | 136 | style="height: 80%" id="{{ id }}-debug"> |
136 | 137 | <div class="inner-wrapper" style="color: black"> |
137 | | - <header><h2>{% trans "Staff Debug" %}</h2></header> |
| 138 | + <header role="banner"><h2>{% trans "Staff Debug" %}</h2></header> |
138 | 139 | <br/> |
139 | 140 | <div class="staff_info" style="display: block; white-space: normal"> |
140 | | - is_released = {{ is_released }}<br/> |
141 | | - location = {{ location }}<br/> |
| 141 | + <span tabindex="1">is_released = {{ is_released }}</span> <br/> |
| 142 | + <span tabindex="1">location = {{ location }}</span><br/> |
142 | 143 | <br/> |
143 | 144 | <table summary="${_('Module Fields')}"> |
144 | | - <tr><th>{% trans "Module Fields" %}</th></tr> |
| 145 | + <tr><th tabindex="1">{% trans "Module Fields" %}</th></tr> |
145 | 146 | {% for name, field in fields %} |
146 | 147 | <tr> |
147 | | - <td>{{name}}</td> |
| 148 | + <td tabindex="1">{{name}}</td> |
148 | 149 | <td> |
149 | | - <pre style="display:inline-block; margin: 0;">{{field}}</pre> |
| 150 | + <pre style="display:inline-block; margin: 0;" tabindex="1">{{field}}</pre> |
150 | 151 | </td> |
151 | 152 | </tr> |
152 | 153 | {% endfor %} |
153 | 154 | </table><br/> |
154 | | - category = {{category}} |
| 155 | + <span tabindex="1">category = {{category}}</span> |
155 | 156 | </div> |
156 | 157 | </div> |
157 | 158 | </section> |
158 | 159 |
|
159 | | - <section aria-hidden="true" class="modal grade-modal" id="{{ id }}-enter-grade"> |
| 160 | + <section class="modal grade-modal" id="{{ id }}-enter-grade"> |
160 | 161 | <div class="inner-wrapper" style="color: black"> |
161 | 162 | <header><h2> |
162 | 163 | {% trans "Enter Grade" %} |
|
168 | 169 | <input id="submission_id-input" type="hidden" name="submission_id"/> |
169 | 170 | <div>Grade for <span id="student-name"/></div> |
170 | 171 | <div>Grade: <input id="grade-input" name="grade"/> |
171 | | - <span class="error"></span></div> |
| 172 | + <span class="error" role="alert" aria-live="assertive" tabindex="1"></span></div> |
172 | 173 | <div>Comment: <textarea id="comment-input" name="comment" rows="4"></textarea></div> |
173 | 174 | <div> |
174 | 175 | <button type="submit">{% trans "Submit" %}</button> |
|
0 commit comments