| 
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 | 
 
  | 
 | 
90 | 91 |           </td>  | 
91 | 92 |           <td>  | 
92 | 93 |             <% if (assignment.may_grade) { %>  | 
93 |  | -              <a class="enter-grade-button button" href="#{{ id }}-enter-grade">  | 
 | 94 | +              <a class="enter-grade-button button" href="#{{ id }}-enter-grade" role="button">  | 
94 | 95 |                 <% if (assignment.needs_approval) { %>  | 
95 | 96 |                   {% trans "Approve grade" %}  | 
96 | 97 |                 <% } else { %>  | 
 | 
100 | 101 |            <% } %>  | 
101 | 102 |           </td>  | 
102 | 103 |           <td>  | 
103 |  | -            <div class="upload">  | 
 | 104 | +            <div class="upload" aria-live="assertive" role="alert" tabindex="1">  | 
104 | 105 |               <input class="fileupload" type="file" name="annotated"/>  | 
105 | 106 |               <button>Upload annotated file</button>  | 
106 | 107 |             </div>  | 
 | 
110 | 111 |     </table>  | 
111 | 112 |   </script>  | 
112 | 113 | 
 
  | 
113 |  | -  <div aria-hidden="true" class="wrap-instructor-info">  | 
 | 114 | +  <div class="wrap-instructor-info">  | 
114 | 115 |     <a class="instructor-info-action" id="grade-submissions-button"  | 
115 | 116 |        href="#{{ id }}-grade">{% trans "Grade Submissions" %}</a>  | 
116 | 117 |     <a class="instructor-info-action" id="staff-debug-info-button"  | 
117 | 118 |        href="#{{ id }}-debug">{% trans "Staff Debug Info" %}</a>  | 
118 | 119 |   </div>  | 
119 | 120 | 
 
  | 
120 |  | -  <section aria-hidden="true" class="modal staff-modal" id="{{ id }}-grade" style="height: 75%">  | 
 | 121 | +  <section class="modal staff-modal" id="{{ id }}-grade" style="height: 75%">  | 
121 | 122 |     <div class="inner-wrapper" style="color: black; overflow: auto;">  | 
122 | 123 |       <header><h2><span class="display_name">{{ display_name }}</span> - {% trans "Staff Graded Assignment" %}</h2></header>  | 
123 | 124 |       <br/>  | 
 | 
127 | 128 |     </div>  | 
128 | 129 |   </section>  | 
129 | 130 | 
 
  | 
130 |  | -  <section aria-hidden="true" class="modal staff-modal"   | 
 | 131 | +  <section class="modal staff-modal"  | 
131 | 132 |            style="height: 80%" id="{{ id }}-debug">  | 
132 | 133 |     <div class="inner-wrapper" style="color: black">  | 
133 |  | -      <header><h2>{% trans "Staff Debug" %}</h2></header>  | 
 | 134 | +      <header role="banner"><h2>{% trans "Staff Debug" %}</h2></header>  | 
134 | 135 |       <br/>  | 
135 | 136 |       <div class="staff_info" style="display: block; white-space: normal">  | 
136 |  | -        is_released = {{ is_released }}<br/>  | 
137 |  | -        location = {{ location }}<br/>  | 
 | 137 | +        <span tabindex="1">is_released = {{ is_released }}</span> <br/>  | 
 | 138 | +        <span tabindex="1">location = {{ location }}</span><br/>  | 
138 | 139 |         <br/>  | 
139 | 140 |         <table summary="${_('Module Fields')}">  | 
140 |  | -          <tr><th>{% trans "Module Fields" %}</th></tr>  | 
 | 141 | +          <tr><th tabindex="1">{% trans "Module Fields" %}</th></tr>  | 
141 | 142 |           {% for name, field in fields %}  | 
142 | 143 |           <tr>  | 
143 |  | -            <td>{{name}}</td>  | 
 | 144 | +            <td tabindex="1">{{name}}</td>  | 
144 | 145 |             <td>  | 
145 |  | -              <pre style="display:inline-block; margin: 0;">{{field}}</pre>  | 
 | 146 | +              <pre style="display:inline-block; margin: 0;"  tabindex="1">{{field}}</pre>  | 
146 | 147 |             </td>  | 
147 | 148 |           </tr>  | 
148 | 149 |           {% endfor %}  | 
149 | 150 |         </table><br/>  | 
150 |  | -        category = {{category}}  | 
 | 151 | +        <span tabindex="1">category = {{category}}</span>  | 
151 | 152 |       </div>  | 
152 | 153 |     </div>  | 
153 | 154 |   </section>  | 
154 | 155 | 
 
  | 
155 |  | -  <section aria-hidden="true" class="modal grade-modal" id="{{ id }}-enter-grade">  | 
 | 156 | +  <section  class="modal grade-modal" id="{{ id }}-enter-grade">  | 
156 | 157 |     <div class="inner-wrapper" style="color: black">  | 
157 | 158 |       <header><h2>  | 
158 | 159 |         {% trans "Enter Grade" %}  | 
 | 
164 | 165 |           <input id="submission_id-input" type="hidden" name="submission_id"/>  | 
165 | 166 |           <div>Grade for <span id="student-name"/></div>  | 
166 | 167 |           <div>Grade: <input id="grade-input" name="grade"/>  | 
167 |  | -            <span class="error"></span></div>  | 
 | 168 | +            <span class="error" role="alert" aria-live="assertive" tabindex="1"></span></div>  | 
168 | 169 |           <div>Comment: <textarea id="comment-input" name="comment" rows="4"></textarea></div>  | 
169 | 170 |           <div>  | 
170 | 171 |             <button type="submit">{% trans "Submit" %}</button>  | 
 | 
0 commit comments