a11y: Modifies DOM order to influence tab order on user page.

fixes CNVS-14406

Test Plan:
  - Go to the account level user page
    (/accounts/##/users/##)
  - In the enrollments section, tabbing through should go to the
    course name before the unenroll link.
  - A screenreader should read the course name prior to the
    unenroll link.

Change-Id: I4436915218d89663a5d4563541e8e251af910038
Reviewed-on: https://gerrit.instructure.com/43767
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
Clay Diffrient 2014-11-03 13:37:05 -07:00
parent 9d50b8f2de
commit e162126e70
1 changed files with 8 additions and 7 deletions

View File

@ -1,10 +1,5 @@
<li class="<%= 'unpublished' if enrollment.course.created? || enrollment.course.claimed? %> <%= enrollment.state_based_on_date %> clearfix"> <li class="<%= 'unpublished' if enrollment.course.created? || enrollment.course.claimed? %> <%= enrollment.state_based_on_date %> clearfix">
<span style="float: right; margin-right: 5px; margin-top: 3px;">
<a href="#" rel="<%= course_unenroll_url(enrollment.course_id, enrollment.id) %>" class="unenroll_link" role="button">
<i class="icon-end standalone-icon"></i>
<span class="screenreader-only"><%= t(:unenrollr, "Unenroll") %></span>
</a>
</span>
<a href="<%= course_user_path(enrollment.course_id, enrollment.user_id) %>" style="float: left;"> <a href="<%= course_user_path(enrollment.course_id, enrollment.user_id) %>" style="float: left;">
<span class="name ellipsis" title="<%= enrollment.long_name %>"> <span class="name ellipsis" title="<%= enrollment.long_name %>">
<%= enrollment.long_name %> <%= enrollment.long_name %>
@ -19,7 +14,7 @@
<span class="subtitle ellipsis"> <span class="subtitle ellipsis">
<%= Enrollment.workflow_readable_type(enrollment.state_based_on_date) %>, <%= Enrollment.workflow_readable_type(enrollment.state_based_on_date) %>,
<%= <%=
case enrollment.class.to_s case enrollment.class.to_s
when 'TeacherEnrollment' when 'TeacherEnrollment'
t('roles_teacher', "Enrolled as a Teacher.") t('roles_teacher', "Enrolled as a Teacher.")
@ -41,6 +36,12 @@
<% end %> <% end %>
</span> </span>
</a> </a>
<span style="float: right; margin-right: 5px; margin-top: 3px;">
<a href="#" rel="<%= course_unenroll_url(enrollment.course_id, enrollment.id) %>" class="unenroll_link" role="button">
<i class="icon-end standalone-icon"></i>
<span class="screenreader-only"><%= t(:unenrollr, "Unenroll") %></span>
</a>
</span>
<% if enrollment.admin? && can_do(enrollment.user, @current_user, :read_reports) %> <% if enrollment.admin? && can_do(enrollment.user, @current_user, :read_reports) %>
<div style='clear:left'> <div style='clear:left'>
<%= link_to(t('links.teacher_activity', 'See Student Interactions Report'), user_course_teacher_activity_url(enrollment.user_id, enrollment.course_id)) %> <%= link_to(t('links.teacher_activity', 'See Student Interactions Report'), user_course_teacher_activity_url(enrollment.user_id, enrollment.course_id)) %>