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 ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -54,8 +54,8 @@ msgid ""
msgstr ""
#: core/templates/core/landing.html:49
#: courses/tests/test_views/test_engagement.py:44
#: courses/views/__init__.py:304 courses/views/__init__.py:554
#: courses/tests/test_views/test_engagement.py:44 courses/views/__init__.py:304
#: courses/views/__init__.py:554
msgid "Engagement"
msgstr ""
......@@ -804,7 +804,7 @@ msgstr ""
msgid "External Tools"
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"
msgstr ""
......@@ -989,13 +989,13 @@ msgid "Gender"
msgstr ""
#. Translators: Content as in course content (e.g. things, not the feeling)
#: courses/tests/test_views/test_engagement.py:62
#: courses/views/__init__.py:561 courses/views/engagement.py:27
#: courses/tests/test_views/test_engagement.py:62 courses/views/__init__.py:561
#: courses/views/engagement.py:27
msgid "Content"
msgstr ""
#: courses/tests/test_views/test_engagement.py:73
#: courses/views/__init__.py:574 courses/views/engagement.py:36
#: courses/tests/test_views/test_engagement.py:73 courses/views/__init__.py:574
#: courses/views/engagement.py:36
msgid "Videos"
msgstr ""
......@@ -1097,7 +1097,7 @@ msgid "Courseware"
msgstr ""
#. Translators: Do not translate UTC.
#: courses/views/course_summaries.py:36
#: courses/views/course_summaries.py:38
#, python-format
msgid ""
"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 <% } %>">
<span class="sr-only"><%-srText %></span>
<span aria-hidden="<%- isHiddenFromSr %>"><%= nonSrText %></span>
<span class="sr-only"><%-srText %></span>
<span aria-hidden="<%- isHiddenFromSr %>"><%= nonSrText %></span>
<span class="sr-only"><% if (isDisabled) { %><%- disabledText %><% } else if (isActive) { %><%- activeText %><% } %></span>
</a>
......@@ -75,7 +75,7 @@ define(function(require) {
} else if (this.isFastForward) {
srText = gettext('last page');
} else {
srText = gettext('page') + ' ';
srText = gettext('page');
isHiddenFromSr = false;
}
this.$el.html(this.template({
......@@ -83,7 +83,12 @@ define(function(require) {
srText: srText,
isHiddenFromSr: isHiddenFromSr,
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();
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