Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AC-179 fixing skip links #9909

Merged
merged 1 commit into from
Feb 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cms/static/sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -648,21 +648,22 @@ hr.divider {
// ui - skipnav
.nav-skip {
@extend %t-action3;
display: block;
display: inline-block;
position: absolute;
left: 0px;
top: -($baseline*30);
width: 1px;
height: 1px;
overflow: hidden;
background: $white;
border-bottom: 1px solid $gray-l4;
padding: ($baseline*0.75) ($baseline/2);

&:focus, &:active {
position: static;
&:focus,
&:active {
position: relative;
top: auto;
width: auto;
height: auto;
margin: 0;
}
}

Expand Down Expand Up @@ -725,4 +726,3 @@ hr.divider {
color: $gray-l1;
}
}

11 changes: 6 additions & 5 deletions cms/static/sass/elements/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ nav {
// skip navigation
.nav-skip {
@include font-size(13);
display: block;
display: inline-block;
position: absolute;
left: 0px;
top: -($baseline*30);
width: 1px;
height: 1px;
overflow: hidden;
background: $white;
border-bottom: 1px solid $gray-l4;
padding: ($baseline*0.75) ($baseline/2);

&:focus, &:active {
position: static;
&:focus,
&:active {
position: relative;
top: auto;
width: auto;
height: auto;
margin: 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion cms/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<%block name="page_alert"></%block>
</div>

<div id="content">
<div id="content" tabindex="-1">
<%block name="content"></%block>
</div>

Expand Down
2 changes: 1 addition & 1 deletion cms/templates/course-create-rerun.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</%block>

<%block name="content">
<div id="content">
<div id="content" tabindex="-1">
<div class="wrapper-mast wrapper">
<header class="mast mast-wizard has-actions">
<h1 class="page-header">
Expand Down
1 change: 0 additions & 1 deletion common/test/acceptance/tests/lms/test_account_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ def test_account_settings_a11y(self):
self.account_settings_page.a11y_audit.config.set_rules({
'ignore': [
'link-href', # TODO: AC-233, AC-238
'skip-link', # TODO: AC-179
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clrux Removing these 'skip-link' lines will result in a check for the skip link on the page during the test, so this should provide the test coverage needed.

})
self.account_settings_page.a11y_audit.check_for_accessibility_errors()
1 change: 0 additions & 1 deletion common/test/acceptance/tests/lms/test_learner_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ def test_read_only_learner_profile_a11y(self):

profile_page.a11y_audit.config.set_rules({
"ignore": [
'skip-link', # TODO: AC-179
'link-href', # TODO: AC-231
],
})
Expand Down
3 changes: 1 addition & 2 deletions common/test/acceptance/tests/lms/test_lms_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ def test_dashboard_course_listings_a11y(self):

self.dashboard_page.a11y_audit.config.set_rules({
"ignore": [
'skip-link', # TODO: AC-179
'link-href', # TODO: AC-238, AC-179
'link-href', # TODO: AC-238
],
})

Expand Down
1 change: 0 additions & 1 deletion common/test/acceptance/tests/studio/test_studio_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ def test_lib_edit_page_a11y(self):
'color-contrast', # TODO: AC-225
'link-href', # TODO: AC-226
'nav-aria-label', # TODO: AC-227
'skip-link', # TODO: AC-228
'icon-aria-hidden', # TODO: AC-229
],
})
Expand Down
6 changes: 3 additions & 3 deletions lms/static/js/spec/search/search_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ define([
'<div class="courseware-results"></div>' +
'<section id="course-content"></section>' +
'<section id="dashboard-search-results"></section>' +
'<section id="my-courses"></section>'
'<section id="my-courses" tabindex="-1"></section>'
);

TemplateHelpers.installTemplates([
Expand Down Expand Up @@ -705,7 +705,7 @@ define([
loadFixtures('js/fixtures/search/dashboard_search_form.html');
appendSetFixtures(
'<section id="dashboard-search-results"></section>' +
'<section id="my-courses"></section>'
'<section id="my-courses" tabindex="-1"></section>'
);
loadTemplates.call(this);
DashboardSearchFactory();
Expand Down Expand Up @@ -753,4 +753,4 @@ define([
});

});
});
});
11 changes: 6 additions & 5 deletions lms/static/sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,21 @@ mark {
.nav-skip {
@extend %ui-print-excluded;

display: block;
display: inline-block;
position: absolute;
left: 0;
top: -($baseline*30);
width: 1px;
height: 1px;
overflow: hidden;
background: $white;
border-bottom: 1px solid $border-color-4;
padding: ($baseline*0.75) ($baseline/2);

&:focus, &:active {
position: static;
&:focus,
&:active {
position: relative;
top: auto;
width: auto;
height: auto;
margin: 0;
}
}
2 changes: 1 addition & 1 deletion lms/static/sass/course/instructor/_instructor_2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ input[name="subject"] {
height: 40px;
border-radius: 3px;
}
#coupon-content, #course-content, #registration-content, #regcode-content {
#coupon-content, #course-content, #content, #registration-content, #regcode-content {
padding: $baseline;
header {
margin: 0;
Expand Down
4 changes: 4 additions & 0 deletions lms/static/sass/multicourse/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@
// ====================
.dashboard .my-courses {

&:focus {
outline: none;
}

// UI: individual course item
.course {
@include box-sizing(box);
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/courseware-chromeless.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<%static:css group='style-student-notes'/>
% endif

<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>

<%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()}
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/courseware.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<%static:css group='style-student-notes'/>
% endif

<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>

<%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()}
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<%namespace name="progress_graph" file="/courseware/progress_graph.js"/>

<%block name="pagetitle">${_("{course_number} Progress").format(course_number=course.display_number_with_default) | h}</%block>
<%block name="nav_skip">#course-info-progress</%block>
<%block name="nav_skip">#content</%block>

<%block name="js_extra">
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js') | h}"></script>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</div>

<section class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-courses" role="main" aria-label="Content">
<section class="my-courses" id="my-courses" role="main" tabindex="-1">
<header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2>
</header>
Expand Down
3 changes: 2 additions & 1 deletion lms/templates/discussion/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
data-sort-preference="${sort_preference | h}"
data-flag-moderator="${flag_moderator | h}"
data-user-cohort-id="${user_cohort | h}"
data-course-settings="${course_settings | h}">
data-course-settings="${course_settings | h}"
tabindex="-1">
<div class="discussion-body">
<div class="forum-nav" role="complementary" aria-label="${_("Discussion thread list")}"></div>
<div class="discussion-column" role="main" aria-label="Discussion" id="discussion-column">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
## 6. And tests go in lms/djangoapps/instructor/tests/

<%block name="pagetitle">${_("Instructor Dashboard")}</%block>
<%block name="nav_skip">#instructor-dashboard-content</%block>
<%block name="nav_skip">#content</%block>

<%block name="headextra">
<%static:css group='style-course-vendor'/>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<%include file="${static.get_template_path('header.html')}" />
% endif

<div class="content-wrapper" id="content">
<div role="main" class="content-wrapper" id="content" tabindex="-1">
${self.body()}
<%block name="bodyextra"/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/main_django.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% with course=request.course %}
{% include "header.html"|microsite_template_path %}
{% endwith %}
<div class="content-wrapper" id="content">
<div role="main" class="content-wrapper" id="content" tabindex="-1">
{% block body %}{% endblock %}
{% block bodyextra %}{% endblock %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/ux/reference/teams-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2><span class="provider">PlantsX:</span> GAR_123 Wild Life</h2>
<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>
</%block>

<%block name="js_extra">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/ux/reference/teams-create.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h2><span class="provider">PlantsX:</span> GAR_123 Wild Life</h2>
<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>
</%block>

<%block name="js_extra">
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/wiki/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="article-wrapper">

<article class="main-article" id="main-article">
<article class="main-article" id="main-article" tabindex="-1">
{% if selected_tab != "edit" %}
<h1>{{ article.current_revision.title }}</h1>

Expand Down
2 changes: 1 addition & 1 deletion themes/edx.org/lms/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>

<section class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-courses" role="main" aria-label="Content">
<section class="my-courses" id="my-courses" role="main" aria-label="Content" tabindex="-1">
<header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2>
</header>
Expand Down