From 443a50845aed5839affb8a215632426299a3f8a2 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Mon, 10 Jun 2013 17:21:20 -0400 Subject: [PATCH] lms - adds back in missing/previously added .sr screen reader-focused styling and references in place of the .visuallyhidden application --- lms/static/sass/base/_base.scss | 2 +- lms/static/sass/base/_mixins.scss | 28 ++++++++++--------- lms/templates/courseware/accordion.html | 2 +- .../courseware/course_navigation.html | 2 +- lms/templates/courseware/progress.html | 2 +- lms/templates/navigation.html | 4 +-- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/lms/static/sass/base/_base.scss b/lms/static/sass/base/_base.scss index 6f43a02df7..9314877249 100644 --- a/lms/static/sass/base/_base.scss +++ b/lms/static/sass/base/_base.scss @@ -209,7 +209,7 @@ mark { } .sr { - @include text-sr(); + @extend .text-sr; } .help-tab { diff --git a/lms/static/sass/base/_mixins.scss b/lms/static/sass/base/_mixins.scss index 0b2b82dad8..4060c36f5f 100644 --- a/lms/static/sass/base/_mixins.scss +++ b/lms/static/sass/base/_mixins.scss @@ -14,18 +14,6 @@ overflow: hidden; } -// hidden elems - screenreaders -@mixin text-sr() { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - @mixin vertically-and-horizontally-centered ( $height, $width ) { left: 50%; margin-left: -$width / 2; @@ -49,4 +37,18 @@ //----------------- @mixin login_register_h1_style {} -@mixin footer_references_style {} \ No newline at end of file +@mixin footer_references_style {} + +// ==================== + +// extends -hidden elems - screenreaders +.text-sr { + border: 0; + clip: rect(1px 1px 1px 1px); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} diff --git a/lms/templates/courseware/accordion.html b/lms/templates/courseware/accordion.html index 673543e8eb..5b9c6f7450 100644 --- a/lms/templates/courseware/accordion.html +++ b/lms/templates/courseware/accordion.html @@ -13,7 +13,7 @@ % for section in chapter['sections']:
  • -

    ${section['display_name']} ${', current section' if 'active' in section and section['active'] else ''}

    +

    ${section['display_name']} ${', current section' if 'active' in section and section['active'] else ''}

    ${section['format']} ${"due " + get_default_time_display(section['due'], show_timezone) if section.get('due') is not None else ''}

  • diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 76868ebb99..98329b9836 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -21,7 +21,7 @@ def url_class(is_active): ${tab.name | h} % if tab.is_active == True: - , current location + , current location %endif % if tab.has_img == True: diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index f7021c9fd6..bf1414cc07 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -56,7 +56,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",

    ${ section['display_name'] } %if total > 0 or earned > 0: - + ${"{0:.3n} of {1:.3n} possible points".format( float(earned), float(total) )} %endif diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 6d25c18af8..190a58f691 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -65,11 +65,11 @@ site_status_msg = get_site_status_msg(course_id)
  • - Dashboard for: ${user.username} + Dashboard for: ${user.username}
  • - More options dropdown + More options dropdown