Commit 3939e2f7 by Tyler Hallada Committed by GitHub

AN-8413 Add disabled/active screen-reader text to pagination links (#637)

* Add disabled/active sr text to pagination links

* Update translations
parent a8660e3a
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-23 17:47-0500\n" "POT-Creation-Date: 2017-03-07 15:07-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -54,8 +54,8 @@ msgid "" ...@@ -54,8 +54,8 @@ msgid ""
msgstr "" msgstr ""
#: core/templates/core/landing.html:49 #: core/templates/core/landing.html:49
#: courses/tests/test_views/test_engagement.py:44 #: courses/tests/test_views/test_engagement.py:44 courses/views/__init__.py:304
#: courses/views/__init__.py:304 courses/views/__init__.py:554 #: courses/views/__init__.py:554
msgid "Engagement" msgid "Engagement"
msgstr "" msgstr ""
...@@ -804,7 +804,7 @@ msgstr "" ...@@ -804,7 +804,7 @@ msgstr ""
msgid "External Tools" msgid "External Tools"
msgstr "" msgstr ""
#: courses/templates/courses/index.html:9 courses/views/course_summaries.py:27 #: courses/templates/courses/index.html:9 courses/views/course_summaries.py:29
msgid "Courses" msgid "Courses"
msgstr "" msgstr ""
...@@ -989,13 +989,13 @@ msgid "Gender" ...@@ -989,13 +989,13 @@ msgid "Gender"
msgstr "" msgstr ""
#. Translators: Content as in course content (e.g. things, not the feeling) #. Translators: Content as in course content (e.g. things, not the feeling)
#: courses/tests/test_views/test_engagement.py:62 #: courses/tests/test_views/test_engagement.py:62 courses/views/__init__.py:561
#: courses/views/__init__.py:561 courses/views/engagement.py:27 #: courses/views/engagement.py:27
msgid "Content" msgid "Content"
msgstr "" msgstr ""
#: courses/tests/test_views/test_engagement.py:73 #: courses/tests/test_views/test_engagement.py:73 courses/views/__init__.py:574
#: courses/views/__init__.py:574 courses/views/engagement.py:36 #: courses/views/engagement.py:36
msgid "Videos" msgid "Videos"
msgstr "" msgstr ""
...@@ -1097,7 +1097,7 @@ msgid "Courseware" ...@@ -1097,7 +1097,7 @@ msgid "Courseware"
msgstr "" msgstr ""
#. Translators: Do not translate UTC. #. Translators: Do not translate UTC.
#: courses/views/course_summaries.py:36 #: courses/views/course_summaries.py:38
#, python-format #, python-format
msgid "" msgid ""
"Course summary data was last updated %(update_date)s at %(update_time)s UTC." "Course summary data was last updated %(update_date)s at %(update_time)s UTC."
......
<a href="#" title="<%- title %>" class="btn btn-link <% if (isDisabled) { %> disabled <% } %>"> <a href="#" title="<%- title %>" class="btn btn-link <% if (isDisabled) { %> disabled <% } %>">
<span class="sr-only"><%-srText %></span> <span class="sr-only"><%-srText %></span>
<span aria-hidden="<%- isHiddenFromSr %>"><%= nonSrText %></span> <span aria-hidden="<%- isHiddenFromSr %>"><%= nonSrText %></span>
<span class="sr-only"><% if (isDisabled) { %><%- disabledText %><% } else if (isActive) { %><%- activeText %><% } %></span>
</a> </a>
...@@ -75,7 +75,7 @@ define(function(require) { ...@@ -75,7 +75,7 @@ define(function(require) {
} else if (this.isFastForward) { } else if (this.isFastForward) {
srText = gettext('last page'); srText = gettext('last page');
} else { } else {
srText = gettext('page') + ' '; srText = gettext('page');
isHiddenFromSr = false; isHiddenFromSr = false;
} }
this.$el.html(this.template({ this.$el.html(this.template({
...@@ -83,7 +83,12 @@ define(function(require) { ...@@ -83,7 +83,12 @@ define(function(require) {
srText: srText, srText: srText,
isHiddenFromSr: isHiddenFromSr, isHiddenFromSr: isHiddenFromSr,
nonSrText: this.label, nonSrText: this.label,
isDisabled: this.$el.hasClass('disabled') isDisabled: this.$el.hasClass('disabled'),
// Translators: describes the state of a pagination button as not clickable
disabledText: gettext('disabled'),
isActive: this.$el.hasClass('active'),
// Translators: describes a pagination button as representing the current page
activeText: gettext('active')
})); }));
this.delegateEvents(); this.delegateEvents();
return this; return this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment