From 98142c02d3ef465c20e06443b13b84025374ebaf Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 16 Sep 2013 17:35:38 -0400 Subject: [PATCH 1/8] Improve accessibility of forum nav sort buttons --- CHANGELOG.rst | 2 ++ .../views/discussion_thread_list_view.coffee | 10 +++++++--- lms/templates/discussion/_thread_list_template.html | 10 +++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e5ddfa222a..fe9218379d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes, in roughly chronological order, most recent first. Add your entries at or near the top. Include a label indicating the component affected. +LMS: Improved accessibility of forum navigation sort buttons + LMS: enhanced shib support, including detection of linked shib account at login page and support for the ?next= GET parameter. diff --git a/common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee b/common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee index c36b3b72d7..2fc31da97a 100644 --- a/common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee +++ b/common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee @@ -353,9 +353,13 @@ if Backbone? @loadMorePages(event) sortThreads: (event) -> - @$(".sort-bar a").removeClass("active") - $(event.target).addClass("active") - @sortBy = $(event.target).data("sort") + activeSort = @$(".sort-bar a[class='active']") + activeSort.removeClass("active") + activeSort.attr("aria-checked", "false") + newSort = $(event.target) + newSort.addClass("active") + newSort.attr("aria-checked", "true") + @sortBy = newSort.data("sort") @displayedCollection.comparator = switch @sortBy when 'date' then @displayedCollection.sortByDateRecentFirst diff --git a/lms/templates/discussion/_thread_list_template.html b/lms/templates/discussion/_thread_list_template.html index 8475387b74..0ef67735b1 100644 --- a/lms/templates/discussion/_thread_list_template.html +++ b/lms/templates/discussion/_thread_list_template.html @@ -22,11 +22,11 @@
- ${_("Sort by:")} -
<%include file="_filter_dropdown.html" />