diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html
index 91dbc150d8..58a6b4f014 100644
--- a/common/djangoapps/pipeline_mako/templates/static_content.html
+++ b/common/djangoapps/pipeline_mako/templates/static_content.html
@@ -4,6 +4,7 @@ from django.contrib.staticfiles.storage import staticfiles_storage
from pipeline_mako import compressed_css, compressed_js
from django.utils.translation import get_language_bidi
from mako.exceptions import TemplateLookupException
+from edxmako.shortcuts import marketing_link
from openedx.core.djangolib.js_utils import js_escaped_string
from openedx.core.djangoapps.site_configuration.helpers import (
@@ -19,6 +20,11 @@ from certificates.api import get_asset_url_by_slug
from lang_pref.api import released_languages
%>
+<%def name="marketing_link(name)"><%
+ link = marketing_link(name)
+ return "/" if link == "#" else link
+%>%def>
+
<%def name='url(file, raw=False)'><%
try:
url = staticfiles_storage.url(file)
diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py
index 47ab031232..bca9f0150c 100644
--- a/common/djangoapps/terrain/ui_helpers.py
+++ b/common/djangoapps/terrain/ui_helpers.py
@@ -536,6 +536,14 @@ def click_link(partial_text, index=0):
wait_for_js_to_load()
+@world.absorb
+def click_button(data_attr, index=0):
+ xpath = '//button[text()="{button_text}"]'.format(
+ button_text=data_attr
+ )
+ world.browser.find_by_xpath(xpath)[index].click()
+
+
@world.absorb
def click_link_by_text(text, index=0):
retry_on_exception(lambda: world.browser.find_link_by_text(text)[index].click())
diff --git a/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html b/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html
index c941c535a6..ee375aca15 100644
--- a/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html
+++ b/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html
@@ -94,15 +94,15 @@
- Fill Browser
- HD
+ Fill Browser
+ HD
diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py
index 20b42c9044..4bec22f311 100644
--- a/common/test/acceptance/pages/lms/instructor_dashboard.py
+++ b/common/test/acceptance/pages/lms/instructor_dashboard.py
@@ -23,7 +23,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the membership tab and returns the MembershipSection
"""
- self.q(css='[data-section=membership]').first.click()
+ self.q(css='[data-section="membership"]').first.click()
membership_section = MembershipPage(self.browser)
membership_section.wait_for_page()
return membership_section
@@ -32,7 +32,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the cohort management tab and returns the CohortManagementSection
"""
- self.q(css='[data-section=cohort_management]').first.click()
+ self.q(css='[data-section="cohort_management"]').first.click()
cohort_management_section = CohortManagementSection(self.browser)
# The first time cohort management is selected, an ajax call is made.
cohort_management_section.wait_for_ajax()
@@ -43,7 +43,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the data download tab and returns a DataDownloadPage.
"""
- self.q(css='[data-section=data_download]').first.click()
+ self.q(css='[data-section="data_download"]').first.click()
data_download_section = DataDownloadPage(self.browser)
data_download_section.wait_for_page()
return data_download_section
@@ -52,7 +52,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the student admin tab and returns the MembershipSection
"""
- self.q(css='[data-section=student_admin]').first.click()
+ self.q(css='[data-section="student_admin"]').first.click()
student_admin_section = StudentAdminPage(self.browser)
student_admin_section.wait_for_page()
return student_admin_section
@@ -61,7 +61,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the certificates tab and returns the CertificatesSection
"""
- self.q(css='[data-section=certificates]').first.click()
+ self.q(css='[data-section="certificates"]').first.click()
certificates_section = CertificatesPage(self.browser)
certificates_section.wait_for_page()
return certificates_section
@@ -70,7 +70,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the timed exam tab and returns the Special Exams Section
"""
- self.q(css='[data-section=special_exams]').first.click()
+ self.q(css='[data-section="special_exams"]').first.click()
timed_exam_section = SpecialExamsPage(self.browser)
timed_exam_section.wait_for_page()
return timed_exam_section
@@ -79,7 +79,7 @@ class InstructorDashboardPage(CoursePage):
"""
Selects the email tab and returns the bulk email section
"""
- self.q(css='[data-section=send_email]').first.click()
+ self.q(css='[data-section="send_email"]').first.click()
email_section = BulkEmailPage(self.browser)
email_section.wait_for_page()
return email_section
@@ -386,7 +386,6 @@ class CohortManagementSection(PageObject):
lambda: "Add a New Cohort" in self.q(css=self._bounded_selector(".form-title")).text,
"Create cohort form is visible"
)
-
textinput = self.q(css=self._bounded_selector("#cohort-name")).results[0]
textinput.send_keys(cohort_name)
@@ -509,7 +508,7 @@ class CohortManagementSection(PageObject):
"""
Selects the settings tab for the cohort currently being edited.
"""
- self.q(css=self._bounded_selector(".cohort-management-settings li.tab-settings>a")).first.click()
+ self.q(css=self._bounded_selector(".cohort-management-settings li.tab-settings>.toggle-button")).first.click()
# pylint: disable=redefined-builtin
def get_cohort_settings_messages(self, type="confirmation", wait_for_messages=True):
@@ -585,7 +584,7 @@ class CohortManagementSection(PageObject):
"""
Click on the link to the Data Download Page.
"""
- self.q(css=self._bounded_selector("a.link-cross-reference[data-section=data_download]")).first.click()
+ self.q(css=self._bounded_selector('[data-section="data_download"]')).first.click()
def upload_cohort_file(self, filename):
"""
@@ -627,7 +626,7 @@ class CohortManagementSection(PageObject):
Shows the discussion topics.
"""
self.q(css=self._bounded_selector(".toggle-cohort-management-discussions")).first.click()
- self.wait_for_element_visibility("#cohort-management-discussion-topics", "Waiting for discussions to appear")
+ self.wait_for_element_visibility("#cohort-discussions-management", "Waiting for discussions to appear")
def discussion_topics_visible(self):
"""
diff --git a/common/test/acceptance/pages/lms/login_and_register.py b/common/test/acceptance/pages/lms/login_and_register.py
index be9980770d..b6e2191f98 100644
--- a/common/test/acceptance/pages/lms/login_and_register.py
+++ b/common/test/acceptance/pages/lms/login_and_register.py
@@ -271,7 +271,7 @@ class CombinedLoginAndRegisterPage(PageObject):
login_form = self.current_form
# Click the password reset link on the login page
- self.q(css="a.forgot-password").click()
+ self.q(css=".forgot-password").click()
# Wait for the password reset form to load
EmptyPromise(
diff --git a/common/test/acceptance/pages/lms/staff_view.py b/common/test/acceptance/pages/lms/staff_view.py
index 410dce6ee5..db23f89fd1 100644
--- a/common/test/acceptance/pages/lms/staff_view.py
+++ b/common/test/acceptance/pages/lms/staff_view.py
@@ -88,7 +88,7 @@ class StaffDebugPage(PageObject):
"""
if user:
self.q(css='input[id^=sd_fu_]').first.fill(user)
- self.q(css='section.staff-modal a.staff-debug-reset').click()
+ self.q(css='.staff-modal .staff-debug-reset').click()
def delete_state(self, user=None):
"""
@@ -96,7 +96,7 @@ class StaffDebugPage(PageObject):
"""
if user:
self.q(css='input[id^=sd_fu_]').fill(user)
- self.q(css='section.staff-modal a.staff-debug-sdelete').click()
+ self.q(css='.staff-modal .staff-debug-sdelete').click()
def rescore(self, user=None):
"""
@@ -105,7 +105,7 @@ class StaffDebugPage(PageObject):
"""
if user:
self.q(css='input[id^=sd_fu_]').first.fill(user)
- self.q(css='section.staff-modal a.staff-debug-rescore').click()
+ self.q(css='.staff-modal .staff-debug-rescore').click()
@property
def idash_msg(self):
diff --git a/common/test/acceptance/tests/discussion/test_cohort_management.py b/common/test/acceptance/tests/discussion/test_cohort_management.py
index 9b4ba2c2c4..4b1db38f4a 100644
--- a/common/test/acceptance/tests/discussion/test_cohort_management.py
+++ b/common/test/acceptance/tests/discussion/test_cohort_management.py
@@ -689,6 +689,13 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
messages = self.cohort_management_page.get_csv_messages()
self.assertEquals(expected_message, messages[0])
+ @attr('a11y')
+ def test_cohorts_management_a11y(self):
+ """
+ Run accessibility audit for cohort management.
+ """
+ self.cohort_management_page.a11y_audit.check_for_accessibility_errors()
+
@attr(shard=6)
class CohortDiscussionTopicsTest(UniqueCourseTest, CohortTestMixin):
@@ -1149,7 +1156,8 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
self.cohort_management_page.add_cohort(new_cohort, content_group=cohort_group)
# After adding the cohort, it should automatically be selected
EmptyPromise(
- lambda: new_cohort == self.cohort_management_page.get_selected_cohort(), "Waiting for new cohort to appear"
+ lambda: new_cohort == self.cohort_management_page.get_selected_cohort(),
+ "Waiting for new cohort to appear"
).fulfill()
self.assertEqual(cohort_group, self.cohort_management_page.get_cohort_associated_content_group())
diff --git a/common/test/acceptance/tests/lms/test_account_settings.py b/common/test/acceptance/tests/lms/test_account_settings.py
index d83ae64663..acf550fc55 100644
--- a/common/test/acceptance/tests/lms/test_account_settings.py
+++ b/common/test/acceptance/tests/lms/test_account_settings.py
@@ -508,9 +508,4 @@ class AccountSettingsA11yTest(AccountSettingsTestMixin, WebAppTest):
"""
self.log_in_as_unique_user()
self.visit_account_settings_page()
- self.account_settings_page.a11y_audit.config.set_rules({
- 'ignore': [
- 'link-href', # TODO: AC-233
- ],
- })
self.account_settings_page.a11y_audit.check_for_accessibility_errors()
diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
index cc8fbc1fc4..adc11cbf91 100644
--- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
+++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
@@ -58,11 +58,6 @@ class LMSInstructorDashboardA11yTest(BaseInstructorDashboardTest):
self.instructor_dashboard_page = self.visit_instructor_dashboard()
def test_instructor_dashboard_a11y(self):
- self.instructor_dashboard_page.a11y_audit.config.set_rules({
- "ignore": [
- 'link-href', # TODO: AC-491
- ]
- })
self.instructor_dashboard_page.a11y_audit.check_for_accessibility_errors()
diff --git a/common/test/acceptance/tests/lms/test_lms_user_preview.py b/common/test/acceptance/tests/lms/test_lms_user_preview.py
index ac02b2705d..83bc672ce7 100644
--- a/common/test/acceptance/tests/lms/test_lms_user_preview.py
+++ b/common/test/acceptance/tests/lms/test_lms_user_preview.py
@@ -186,7 +186,6 @@ class StaffDebugTest(CourseWithoutContentGroupsTest):
"""
staff_page = self._goto_staff_page()
staff_page.answer_problem()
-
staff_debug_page = staff_page.open_staff_debug_info()
staff_debug_page.delete_state('INVALIDUSER')
msg = staff_debug_page.idash_msg[0]
@@ -383,6 +382,24 @@ class CourseWithContentGroupsTest(StaffViewTest):
course_page.set_staff_view_mode_specific_student(student_b_username)
verify_expected_problem_visibility(self, course_page, [self.beta_text, self.everyone_text])
+ @attr('a11y')
+ def test_course_page(self):
+ """
+ Run accessibility audit for course staff pages.
+ """
+ course_page = self._goto_staff_page()
+ course_page.a11y_audit.config.set_rules({
+ 'ignore': [
+ 'aria-allowed-attr', # TODO: AC-559
+ 'aria-roles', # TODO: AC-559,
+ 'aria-valid-attr', # TODO: AC-559
+ 'color-contrast', # TODO: AC-559
+ 'link-href', # TODO: AC-559
+ 'section', # TODO: AC-559
+ ]
+ })
+ course_page.a11y_audit.check_for_accessibility_errors()
+
def verify_expected_problem_visibility(test, courseware_page, expected_problems):
"""
diff --git a/common/test/acceptance/tests/studio/test_studio_library.py b/common/test/acceptance/tests/studio/test_studio_library.py
index ee9412f312..9047d741d7 100644
--- a/common/test/acceptance/tests/studio/test_studio_library.py
+++ b/common/test/acceptance/tests/studio/test_studio_library.py
@@ -656,8 +656,8 @@ class StudioLibraryA11yTest(StudioLibraryTest):
# we will ignore this error in the test until we fix them.
lib_page.a11y_audit.config.set_rules({
"ignore": [
- 'link-href', # TODO: AC-226
'icon-aria-hidden', # TODO: AC-229
+ 'link-href', # TODO: AC-564
],
})
diff --git a/common/test/acceptance/tests/studio/test_studio_settings.py b/common/test/acceptance/tests/studio/test_studio_settings.py
index 06d42fb8c5..fc605b0551 100644
--- a/common/test/acceptance/tests/studio/test_studio_settings.py
+++ b/common/test/acceptance/tests/studio/test_studio_settings.py
@@ -504,7 +504,7 @@ class StudioSettingsA11yTest(StudioCourseTest):
# we will ignore this error in the test until we fix them.
self.settings_page.a11y_audit.config.set_rules({
"ignore": [
- 'link-href', # TODO: AC-226
+ 'link-href', # TODO: AC-557
'icon-aria-hidden', # TODO: AC-229
],
})
diff --git a/common/test/acceptance/tests/studio/test_studio_textbooks.py b/common/test/acceptance/tests/studio/test_studio_textbooks.py
index cdfe8fce97..db6f9e3f3d 100644
--- a/common/test/acceptance/tests/studio/test_studio_textbooks.py
+++ b/common/test/acceptance/tests/studio/test_studio_textbooks.py
@@ -61,7 +61,6 @@ class TextbooksTest(StudioCourseTest):
self.textbook_view_page.a11y_audit.config.set_rules({
'ignore': [
'skip-link', # AC-501
- 'link-href', # AC-502
'section' # AC-503
],
})
@@ -77,13 +76,17 @@ class TextbooksTest(StudioCourseTest):
self.textbook_view_page.visit()
self.textbook_view_page.switch_to_pdf_frame(self)
+ self.textbook_view_page.a11y_audit.config.set_scope({
+ 'exclude': [
+ '#viewer', # PDF viewer (vendor file)
+ ]
+ })
self.textbook_view_page.a11y_audit.config.set_rules({
'ignore': [
'color-contrast', # will always fail because pdf.js converts pdf to divs with transparent text
'html-lang', # AC-504
'meta-viewport', # AC-505
'skip-link', # AC-506
- 'link-href', # AC-507
],
})
self.textbook_view_page.a11y_audit.check_for_accessibility_errors()
diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py
index fb6dff6aa6..8814d45a47 100644
--- a/lms/djangoapps/courseware/features/courseware_common.py
+++ b/lms/djangoapps/courseware/features/courseware_common.py
@@ -15,6 +15,11 @@ def i_click_on_the_tab(step, tab_text):
world.click_link(tab_text)
+@step('I click the "([^"]*)" button$')
+def i_click_on_the_button(step, data_attr):
+ world.click_button(data_attr)
+
+
@step('I click on the "([^"]*)" link$')
def i_click_on_the_link(step, link_text):
world.click_link(link_text)
diff --git a/lms/djangoapps/courseware/features/lti.feature b/lms/djangoapps/courseware/features/lti.feature
index a10b706ce2..84514b533b 100644
--- a/lms/djangoapps/courseware/features/lti.feature
+++ b/lms/djangoapps/courseware/features/lti.feature
@@ -51,7 +51,7 @@ Feature: LMS.LTI component
Then I see text "Problem Scores: 5/10"
And I see graph with total progress "5%"
Then I click on the "Instructor" tab
- And I click on the "Student Admin" tab
+ And I click the "Student Admin" button
And I click on the "View Gradebook" link
And I see in the gradebook table that "HW" is "50"
And I see in the gradebook table that "Total" is "5"
@@ -90,7 +90,7 @@ Feature: LMS.LTI component
Then I see text "Problem Scores: 8/10"
And I see graph with total progress "8%"
Then I click on the "Instructor" tab
- And I click on the "Student Admin" tab
+ And I click the "Student Admin" button
And I click on the "View Gradebook" link
And I see in the gradebook table that "HW" is "80"
And I see in the gradebook table that "Total" is "8"
@@ -116,7 +116,7 @@ Feature: LMS.LTI component
Then I see text "Problem Scores: 0/10"
And I see graph with total progress "0%"
Then I click on the "Instructor" tab
- And I click on the "Student Admin" tab
+ And I click the "Student Admin" button
And I click on the "View Gradebook" link
And I see in the gradebook table that "HW" is "0"
And I see in the gradebook table that "Total" is "0"
diff --git a/lms/djangoapps/instructor/features/common.py b/lms/djangoapps/instructor/features/common.py
index 3f6534d446..8c1b728096 100644
--- a/lms/djangoapps/instructor/features/common.py
+++ b/lms/djangoapps/instructor/features/common.py
@@ -76,7 +76,7 @@ def go_to_section(section_name):
# course_info, membership, student_admin, data_download, analytics, send_email
world.visit(u'/courses/{}'.format(world.course_key))
world.css_click(u'a[href="/courses/{}/instructor"]'.format(world.course_key))
- world.css_click('a[data-section="{0}"]'.format(section_name))
+ world.css_click('[data-section="{0}"]'.format(section_name))
@step(u'I click "([^"]*)"')
diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py
index a69b1d849e..6b306d012b 100644
--- a/lms/djangoapps/instructor/tests/test_ecommerce.py
+++ b/lms/djangoapps/instructor/tests/test_ecommerce.py
@@ -29,7 +29,7 @@ class TestECommerceDashboardViews(SharedModuleStoreTestCase):
# URL for instructor dash
cls.url = reverse('instructor_dashboard', kwargs={'course_id': cls.course.id.to_deprecated_string()})
- cls.e_commerce_link = 'E-Commerce '
+ cls.e_commerce_link = 'E-Commerce '
def setUp(self):
super(TestECommerceDashboardViews, self).setUp()
diff --git a/lms/djangoapps/instructor/tests/test_email.py b/lms/djangoapps/instructor/tests/test_email.py
index 4297b241e8..da62d3176d 100644
--- a/lms/djangoapps/instructor/tests/test_email.py
+++ b/lms/djangoapps/instructor/tests/test_email.py
@@ -31,7 +31,7 @@ class TestNewInstructorDashboardEmailViewMongoBacked(SharedModuleStoreTestCase):
# URL for instructor dash
cls.url = reverse('instructor_dashboard', kwargs={'course_id': cls.course.id.to_deprecated_string()})
# URL for email view
- cls.email_link = 'Email '
+ cls.email_link = 'Email '
def setUp(self):
super(TestNewInstructorDashboardEmailViewMongoBacked, self).setUp()
@@ -126,7 +126,7 @@ class TestNewInstructorDashboardEmailViewXMLBacked(SharedModuleStoreTestCase):
# URL for instructor dash
cls.url = reverse('instructor_dashboard', kwargs={'course_id': cls.course_key.to_deprecated_string()})
# URL for email view
- cls.email_link = 'Email '
+ cls.email_link = 'Email '
def setUp(self):
super(TestNewInstructorDashboardEmailViewXMLBacked, self).setUp()
@@ -138,7 +138,7 @@ class TestNewInstructorDashboardEmailViewXMLBacked(SharedModuleStoreTestCase):
# URL for instructor dash
self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course_key.to_deprecated_string()})
# URL for email view
- self.email_link = 'Email '
+ self.email_link = 'Email '
def tearDown(self):
super(TestNewInstructorDashboardEmailViewXMLBacked, self).tearDown()
diff --git a/lms/djangoapps/instructor/tests/test_proctoring.py b/lms/djangoapps/instructor/tests/test_proctoring.py
index 22d5bb363a..ff5f22b91e 100644
--- a/lms/djangoapps/instructor/tests/test_proctoring.py
+++ b/lms/djangoapps/instructor/tests/test_proctoring.py
@@ -27,7 +27,8 @@ class TestProctoringDashboardViews(SharedModuleStoreTestCase):
# URL for instructor dash
cls.url = reverse('instructor_dashboard', kwargs={'course_id': cls.course.id.to_deprecated_string()})
- cls.proctoring_link = 'Special Exams '
+ button = 'Special Exams '
+ cls.proctoring_link = button
def setUp(self):
super(TestProctoringDashboardViews, self).setUp()
diff --git a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py
index fc50c41ecf..b2bf82e779 100644
--- a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py
+++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py
@@ -207,7 +207,7 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
Test analytics dashboard message is shown
"""
response = self.client.get(self.url)
- analytics_section = 'Analytics '
+ analytics_section = 'Analytics ' # pylint: disable=line-too-long
self.assertIn(analytics_section, response.content)
# link to dashboard shown
diff --git a/lms/static/coffee/src/instructor_dashboard/instructor_dashboard.coffee b/lms/static/coffee/src/instructor_dashboard/instructor_dashboard.coffee
index e30556bbc2..7beee97056 100644
--- a/lms/static/coffee/src/instructor_dashboard/instructor_dashboard.coffee
+++ b/lms/static/coffee/src/instructor_dashboard/instructor_dashboard.coffee
@@ -91,7 +91,7 @@ $ =>
# handles hiding and showing sections
setup_instructor_dashboard = (idash_content) =>
# clickable section titles
- $links = idash_content.find(".#{CSS_INSTRUCTOR_NAV}").find('a')
+ $links = idash_content.find(".#{CSS_INSTRUCTOR_NAV}").find('.btn-link')
# attach link click handlers
$links.each (i, link) ->
@@ -100,6 +100,7 @@ setup_instructor_dashboard = (idash_content) =>
# deactivate all link & section styles
idash_content.find(".#{CSS_INSTRUCTOR_NAV} li").children().removeClass CSS_ACTIVE_SECTION
+ idash_content.find(".#{CSS_INSTRUCTOR_NAV} li").children().attr('aria-pressed', 'false')
idash_content.find(".#{CSS_IDASH_SECTION}").removeClass CSS_ACTIVE_SECTION
# discover section paired to link
@@ -108,6 +109,7 @@ setup_instructor_dashboard = (idash_content) =>
# activate link & section styling
$(this).addClass CSS_ACTIVE_SECTION
+ $(this).attr('aria-pressed','true')
$section.addClass CSS_ACTIVE_SECTION
# tracking
diff --git a/lms/static/js/fixtures/accordion.html b/lms/static/js/fixtures/accordion.html
index 555d357a06..d699a0f946 100644
--- a/lms/static/js/fixtures/accordion.html
+++ b/lms/static/js/fixtures/accordion.html
@@ -8,21 +8,21 @@
]
\ No newline at end of file
+]
diff --git a/lms/static/js/fixtures/dashboard/dashboard.html b/lms/static/js/fixtures/dashboard/dashboard.html
index 2c93f85e75..0944af0cd6 100644
--- a/lms/static/js/fixtures/dashboard/dashboard.html
+++ b/lms/static/js/fixtures/dashboard/dashboard.html
@@ -21,9 +21,9 @@
Learn more about the verified Certificate of Achievement .
-Find New Courses
+Find New Courses
-
+
diff --git a/lms/static/js/groups/views/cohorts.js b/lms/static/js/groups/views/cohorts.js
index 63b60e0c30..8c9614c680 100644
--- a/lms/static/js/groups/views/cohorts.js
+++ b/lms/static/js/groups/views/cohorts.js
@@ -304,7 +304,6 @@
});
}
}).render();
- this.$('#file-upload-form-file').focus();
}
},
showDiscussionTopics: function(event) {
@@ -330,7 +329,7 @@
},
getSectionCss: function(section) {
- return ".instructor-nav .nav-item a[data-section='" + section + "']";
+ return ".instructor-nav .nav-item [data-section='" + section + "']";
}
});
return CohortsView;
diff --git a/lms/static/js/spec/groups/views/cohorts_spec.js b/lms/static/js/spec/groups/views/cohorts_spec.js
index 69dfcc030c..8b1fd433e8 100644
--- a/lms/static/js/spec/groups/views/cohorts_spec.js
+++ b/lms/static/js/spec/groups/views/cohorts_spec.js
@@ -353,8 +353,9 @@ define(['backbone', 'jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers
};
beforeEach(function() {
- setFixtures('
' +
+ setFixtures('
' +
'
');
TemplateHelpers.installTemplate('templates/instructor/instructor_dashboard_2/cohorts');
TemplateHelpers.installTemplate('templates/instructor/instructor_dashboard_2/cohort-form');
@@ -608,7 +609,7 @@ define(['backbone', 'jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers
it('can select the Settings tab', function() {
createCohortsView(this, {selectCohort: 1});
- cohortsView.$('.tab-settings a').click();
+ cohortsView.$('.tab-settings button').click();
expect(cohortsView.$('.tab-manage_students')).not.toHaveClass('is-selected');
expect(cohortsView.$('.tab-settings')).toHaveClass('is-selected');
expect(cohortsView.$('.tab-content-manage_students')).toHaveClass('is-hidden');
diff --git a/lms/static/js/spec/views/fields_spec.js b/lms/static/js/spec/views/fields_spec.js
index f574d4c60f..9c525ded96 100644
--- a/lms/static/js/spec/views/fields_spec.js
+++ b/lms/static/js/spec/views/fields_spec.js
@@ -12,7 +12,7 @@ define(['backbone', 'jquery', 'underscore', 'edx-ui-toolkit/js/utils/spec-helper
timerCallback,
dropdownSelectClass = '.u-field-value > select',
dropdownButtonClass = '.u-field-value > button',
- textareaLinkClass = '.u-field-value a';
+ textareaLinkClass = '.u-field-value .clickable';
var fieldViewClasses = [
FieldViews.ReadonlyFieldView,
diff --git a/lms/static/js/views/fields.js b/lms/static/js/views/fields.js
index c67f185711..10faf94f42 100644
--- a/lms/static/js/views/fields.js
+++ b/lms/static/js/views/fields.js
@@ -512,6 +512,7 @@
fieldTemplate: field_textarea_template,
events: {
+ 'keydown .wrapper-u-field': 'startEditing',
'click .wrapper-u-field': 'startEditing',
'click .u-field-placeholder': 'startEditing',
'focusout textarea': 'finishEditing',
diff --git a/lms/static/sass/base/_base.scss b/lms/static/sass/base/_base.scss
index ac4a6bbad6..f9f48ead04 100644
--- a/lms/static/sass/base/_base.scss
+++ b/lms/static/sass/base/_base.scss
@@ -247,60 +247,55 @@ mark {
}
.help-tab {
- @include transform(rotate(-90deg));
- @include transform-origin(0 0);
- @extend %ui-depth2;
- @extend %ui-print-excluded;
- top: 250px;
- left: 0;
- position: fixed;
+ @include transform(rotate(-90deg));
+ @include transform-origin(0 0);
+ @extend %ui-depth2;
+ @extend %ui-print-excluded;
+ position: fixed;
+ top: 250px;
+ left: 0;
- a:link, a:visited {
- cursor: pointer;
- border: 1px solid $gray-l3;
- border-top-style: none;
- border-radius: 0 0 ($baseline/2) ($baseline/2);
- background: transparentize($white, 0.25);
- color: transparentize(#333, 0.25);
- font-weight: bold;
- text-decoration: none;
- padding: 6px 22px 11px;
- display: inline-block;
+ a:link,
+ a:visited {
+ border: 1px solid $gray-l3;
+ border-top-style: none;
+ border-radius: 0 0 ($baseline/2) ($baseline/2);
+ background: transparentize($white, 0.25);
+ color: transparentize($base-font-color, 0.25);
+ font-weight: bold;
+ text-decoration: none;
+ padding: 6px 22px 11px;
+ display: inline-block;
- &:hover, &:focus {
- color: $white;
- background: $link-color;
+ &:hover,
+ &:focus {
+ color: $white;
+ background: $link-color;
+ }
}
- }
}
.help-buttons {
- padding: ($baseline/2) ($baseline*2.5);
-
- a:link, a:visited {
- padding: ($baseline*0.75) 0;
+ padding: ($baseline/2) ($baseline*2.5);
text-align: center;
- cursor: pointer;
- background: $white;
- text-decoration: none;
- display: block;
- border: 1px solid $gray-l3;
- feedback_link_problem {
- border-bottom-style: none;
- border-radius: ($baseline/2) ($baseline/2) 0 0;
+ button {
+ @extend %btn-secondary-blue-outline;
+ margin: .5rem 0;
+ font-weight: initial;
+ text-shadow: none;
+ letter-spacing: initial !important;
+ text-transform: normal !important;
+ vertical-align: initial;
+
+ &:hover,
+ &:focus {
+ background: $link-color !important;
+ color: $white;
+ box-shadow: none !important;
+ text-shadow: none !important;
+ }
}
-
- feedback_link_question {
- border-top-style: none;
- border-radius: 0 0 ($baseline/2) ($baseline/2);
- }
-
- &:hover, &:focus {
- color: $white;
- background: $link-color;
- }
- }
}
#feedback_form {
diff --git a/lms/static/sass/course/instructor/_instructor_2.scss b/lms/static/sass/course/instructor/_instructor_2.scss
index 8369a110b7..defb7f8e73 100644
--- a/lms/static/sass/course/instructor/_instructor_2.scss
+++ b/lms/static/sass/course/instructor/_instructor_2.scss
@@ -262,25 +262,33 @@
}
.instructor-nav {
- @extend %ui-no-list;
- border-top: 1px solid $gray-l3;
- border-bottom: 1px solid $gray-l3;
+ @extend %ui-no-list;
+ border-top: 1px solid $gray-l3;
+ border-bottom: 1px solid $gray-l3;
- .nav-item {
- @extend %t-copy-base;
- display: inline-block;
- margin: ($baseline/2) $baseline;
+ .nav-item {
+ @extend %t-copy-base;
+ display: inline-block;
- a {
- display: block;
- text-transform: uppercase;
+ .btn-link {
+ display: inline-block;
+ padding: ($baseline/2) $baseline;
+ border: 0;
+ box-shadow: none;
+ text-shadow: none;
- &.active-section {
- color: $black;
+ &:hover,
+ &:focus {
+ background: $gray-l5 !important;
+ }
+
+ &.active-section {
+ background: $gray-l5;
+ color: $black;
+ }
+ }
}
- }
}
- }
}
// elements - general
@@ -1015,9 +1023,21 @@
// CSV-based file upload for auto cohort assigning and
// cohort the discussion topics.
- .toggle-cohort-management-secondary, .toggle-cohort-management-discussions {
- @extend %t-copy-sub1;
- }
+ .toggle-cohort-management-secondary,
+ .toggle-cohort-management-discussions {
+ @extend %t-copy-sub1;
+ background: transparent;
+ border: none;
+ box-shadow: none;
+ text-shadow: none;
+ padding: 0;
+ color: $uxpl-blue-base;
+
+ &:hover,
+ &:focus {
+ text-decoration: underline;
+ }
+ }
.cohort-management-file-upload {
@@ -1056,7 +1076,7 @@
@extend %t-copy-sub1;
margin-top: $baseline;
padding: ($baseline/2) $baseline;
- background: $gray-l5;
+ background: $gray-l6;
border-radius: ($baseline/10);
@@ -1215,9 +1235,14 @@
position: relative;
display: inline-block;
- a {
+ .toggle-button {
display: inline-block;
padding: ($baseline - 5);
+ background: transparent;
+ border-radius: 0;
+ border: 0;
+ box-shadow: none;
+ color: $uxpl-blue-base;
// These transitions null out previously/globally set transitions
-webkit-transition: none;
-moz-transition: none;
@@ -1228,7 +1253,7 @@
&.is-selected { // Active or selected tabs (
) get this class. Also useful for aria stuff if ever implemented in the future.
- a {
+ .toggle-button {
padding-bottom: ($baseline - 5);
border-style: solid;
@include border-width(1px 1px 0 1px);
diff --git a/lms/static/sass/elements/_controls.scss b/lms/static/sass/elements/_controls.scss
index 91dd1fdee7..cf1ad9848b 100644
--- a/lms/static/sass/elements/_controls.scss
+++ b/lms/static/sass/elements/_controls.scss
@@ -459,6 +459,8 @@
padding: 1px;
background: $transparent;
background-image: none;
+ box-shadow: none;
+ text-shadow: none;
@extend %t-action3;
@extend %t-strong;
diff --git a/lms/static/sass/multicourse/_course_about.scss b/lms/static/sass/multicourse/_course_about.scss
index e052c69758..833593ec01 100644
--- a/lms/static/sass/multicourse/_course_about.scss
+++ b/lms/static/sass/multicourse/_course_about.scss
@@ -59,17 +59,20 @@
@include text-align(left);
text-shadow: 0 1px rgba(255,255,255, 0.6);
- a {
- color: $lighter-base-font-color;
- font: italic 700 0.6em/1em $sans-serif;
- letter-spacing: 0px;
- @include margin-left($baseline*0.75);
- text-shadow: 0 1px rgba(255,255,255, 0.6);
- text-transform: none;
+ .button-org {
+ @include margin-left($baseline*0.75);
+ background: transparent !important;
+ border: none !important;
+ box-shadow: none !important;
+ text-shadow: none !important;
+ text-transform: normal !important;
+ font-size: $body-font-size;
+ color: $base-font-color !important;
+ letter-spacing: 0px !important;
- &:hover, &:focus {
- color: $link-color;
- }
+ &:hover, &:focus {
+ color: $link-color;
+ }
}
}
@@ -78,7 +81,7 @@
margin: 0;
a {
- color: $lighter-base-font-color;
+ color: $base-font-color;
font: italic 700 1em/1em $sans-serif;
letter-spacing: 0px;
text-shadow: 0 1px rgba(255,255,255, 0.6);
diff --git a/lms/static/sass/views/_login-register.scss b/lms/static/sass/views/_login-register.scss
index 7b4ac1607e..09a6bc94de 100644
--- a/lms/static/sass/views/_login-register.scss
+++ b/lms/static/sass/views/_login-register.scss
@@ -266,10 +266,22 @@
display: block;
margin-bottom: ($baseline/2);
margin-top: ($baseline/4);
- color: $m-blue-d5;
+ border: none;
+ padding: 0;
+ background: transparent;
+ box-shadow: none;
+ text-transform: initial;
+ letter-spacing: normal;
+ color: $uxpl-blue-base;
font-weight: $font-regular;
- text-decoration: none !important; // needed but nasty
+ text-decoration: none;
+ text-shadow: none;
font-family: $sans-serif;
+
+ &:hover,
+ &:focus {
+ text-decoration: underline;
+ }
}
input,
diff --git a/lms/templates/ccx/coach_dashboard.html b/lms/templates/ccx/coach_dashboard.html
index fb043fbe76..4d0d942b3a 100644
--- a/lms/templates/ccx/coach_dashboard.html
+++ b/lms/templates/ccx/coach_dashboard.html
@@ -56,16 +56,16 @@ from openedx.core.djangolib.js_utils import (
%if ccx:
diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html
index cf2ecc9482..bfa62e86ee 100644
--- a/lms/templates/courseware/course_about.html
+++ b/lms/templates/courseware/course_about.html
@@ -115,7 +115,7 @@ from openedx.core.lib.courses import course_image_url
diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html
index c9d867c9b4..651564f1c8 100644
--- a/lms/templates/dashboard/_dashboard_course_listing.html
+++ b/lms/templates/dashboard/_dashboard_course_listing.html
@@ -391,8 +391,8 @@ from student.helpers import (
"to request payment, or you can "
"{unenroll_link_start}unenroll{unenroll_link_end} "
"from this course")).format(
- contact_link_start=HTML(''),
- contact_link_end=HTML(' '),
+ contact_link_start=HTML(''),
+ contact_link_end=HTML(' '),
unenroll_link_start=HTML(
'<%- message %>
<% if (show_link) { %>
<% if (is_expanded) { %>
- <%- gettext('Less') %>
+ <%- gettext('Less') %>
<% } else { %>
- <%- gettext('More') %>
+ <%- gettext('More') %>
<% } %>
<% } %>
diff --git a/lms/templates/edxnotes/tab-item.underscore b/lms/templates/edxnotes/tab-item.underscore
index 97053c2508..91b6de9814 100644
--- a/lms/templates/edxnotes/tab-item.underscore
+++ b/lms/templates/edxnotes/tab-item.underscore
@@ -5,9 +5,8 @@
<% if (is_closable) { %>
-
+
<%- gettext("Clear search results") %>
-
+
<% } %>
-
diff --git a/lms/templates/fields/field_textarea.underscore b/lms/templates/fields/field_textarea.underscore
index 96cb712a2b..79a959b644 100644
--- a/lms/templates/fields/field_textarea.underscore
+++ b/lms/templates/fields/field_textarea.underscore
@@ -3,7 +3,7 @@
<% if (mode === 'edit') { %>
<% } else { %>
-
+
<% } %>
<% if (messagePosition === 'header') { %>
@@ -27,8 +27,12 @@
<% } %>
><%- value %>
<% } else { %>
- ><%- screenReaderTitle %>
<%- value %> <%- gettext('Click to edit') %>
+ >
+ <%- screenReaderTitle %>
+ <%- value %>
+ <%- gettext('Click to edit') %>
<%- placeholderValue %>
+
<% } %>
diff --git a/lms/templates/help_modal.html b/lms/templates/help_modal.html
index 3c4218e3ca..cca6b9562c 100644
--- a/lms/templates/help_modal.html
+++ b/lms/templates/help_modal.html
@@ -73,9 +73,9 @@ from xmodule.tabs import CourseTabList
${_('Please note: The {platform_name} support team is English speaking. While we will do our best to address your inquiry in any language, our responses will be in English.').format(
@@ -268,8 +268,8 @@ from xmodule.tabs import CourseTabList
htmlStr = "${_('An error has occurred.') | n, js_escaped_string}";
% if settings.FEEDBACK_SUBMISSION_EMAIL:
htmlStr += " " + "${Text(_('Please {link_start}send us e-mail{link_end}.')).format(
- link_start=HTML(''),
- link_end=HTML(' '),
+ link_start=HTML(''),
+ link_end=HTML(' '),
) | n, js_escaped_string}";
% else:
// If no email is configured, we can't do much other than
diff --git a/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore b/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore
index 0c44e4e494..688155c9a4 100644
--- a/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore
+++ b/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore
@@ -2,8 +2,8 @@
diff --git a/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore b/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore
index 7ca01ef3f7..82eb5ea17b 100644
--- a/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore
+++ b/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore
@@ -34,17 +34,17 @@
-
<%- gettext('Assign students to cohorts by uploading a CSV file') %>
-
+
<%- gettext('Assign students to cohorts by uploading a CSV file') %>
+
<%= HtmlUtils.interpolateHtml(
- gettext('To review student cohort assignments or see the results of uploading a CSV file, download course profile information or cohort results on {link_start} the Data Download page. {link_end}'),
+ gettext('To review student cohort assignments or see the results of uploading a CSV file, download course profile information or cohort results on the {link_start}Data Download{link_end} page.'),
{
- link_start: HtmlUtils.HTML(''),
- link_end: HtmlUtils.HTML(' ')
+ link_start: HtmlUtils.HTML(''),
+ link_end: HtmlUtils.HTML(' ')
})
%>
@@ -53,8 +53,8 @@
-
<%- gettext('Specify whether discussion topics are divided by cohort') %>
-
+
<%- gettext('Specify whether discussion topics are divided by cohort') %>
+
diff --git a/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html b/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html
index ca827d7fc0..4ee0efa67f 100644
--- a/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html
+++ b/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html
@@ -109,7 +109,7 @@ from django.core.urlresolvers import reverse
% for section_data in sections:
## This is necessary so we don't scrape 'section_display_name' as a string.
<% dname = section_data['section_display_name'] %>
-
${_(dname)}
+
${_(dname)}
% endfor
diff --git a/lms/templates/instructor/instructor_dashboard_2/metrics.html b/lms/templates/instructor/instructor_dashboard_2/metrics.html
index ff024a1873..dfe6c6b63e 100644
--- a/lms/templates/instructor/instructor_dashboard_2/metrics.html
+++ b/lms/templates/instructor/instructor_dashboard_2/metrics.html
@@ -241,7 +241,7 @@ from django.template.defaultfilters import escapejs
});
if (window.location.hash === "#view-metrics") {
- $('.instructor-nav a[data-section="metrics"]').click();
+ $('.instructor-nav [data-section="metrics"]').click();
$('#graph_reload').hide();
$('.metrics-header-container').hide();
}
diff --git a/lms/templates/pdf_viewer.html b/lms/templates/pdf_viewer.html
index ff400b29f3..aa844acf03 100644
--- a/lms/templates/pdf_viewer.html
+++ b/lms/templates/pdf_viewer.html
@@ -1,5 +1,11 @@
+<%page expression_filter="h"/>
<%namespace name='static' file='static_content.html'/>
+<%!
+from openedx.core.djangolib.js_utils import (
+ js_escaped_string
+)
+%>
-
+
Current View
-
+
diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html
index 4d5cbfea6c..8038a15e2d 100644
--- a/lms/templates/staff_problem_info.html
+++ b/lms/templates/staff_problem_info.html
@@ -69,14 +69,14 @@ ${block_content}
[
% if can_reset_attempts:
-
${_('Reset Student Attempts')}
+
${_('Reset Student Attempts')}
|
% endif
% if has_instructor_access:
-
${_('Delete Student State')}
+
${_('Delete Student State')}
% if can_rescore_problem:
|
-
${_('Rescore Student Submission')}
+
${_('Rescore Student Submission')}
% endif
% endif
]
@@ -148,4 +148,3 @@ $(function () {
});
%endif
-
diff --git a/lms/templates/static_htmlbook.html b/lms/templates/static_htmlbook.html
index dafd473b56..c452837370 100644
--- a/lms/templates/static_htmlbook.html
+++ b/lms/templates/static_htmlbook.html
@@ -126,7 +126,7 @@ from openedx.core.djangolib.js_utils import (
<%def name="print_entry(entry, index_value)">
-
+
${entry.get('title')}
diff --git a/lms/templates/static_pdfbook.html b/lms/templates/static_pdfbook.html
index 4b1079250b..b73d3f15d4 100644
--- a/lms/templates/static_pdfbook.html
+++ b/lms/templates/static_pdfbook.html
@@ -1,8 +1,14 @@
+<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
-<%block name="pagetitle">${_('{course_number} Textbook').format(course_number=course.display_number_with_default) | h}%block>
+<%!
+from openedx.core.djangolib.js_utils import (
+ js_escaped_string
+)
+%>
+<%block name="pagetitle">${_('{course_number} Textbook').format(course_number=course.display_number_with_default)}%block>
<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
@@ -13,11 +19,11 @@
<%include file="/courseware/course_navigation.html" args="active_page='pdftextbook/{0}'.format(book_index)" />