Commit 4cf0e19a by Chris Rodriguez

AC-520 fixing `section` ignores

parent 39c2abdf
...@@ -4,7 +4,7 @@ from lettuce import world, step ...@@ -4,7 +4,7 @@ from lettuce import world, step
SELECTORS = { SELECTORS = {
'spinner': '.video-wrapper .spinner', 'spinner': '.video-wrapper .spinner',
'controls': 'section.video-controls', 'controls': '.video-controls',
} }
# We should wait 300 ms for event handler invocation + 200ms for safety. # We should wait 300 ms for event handler invocation + 200ms for safety.
......
...@@ -74,17 +74,17 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -74,17 +74,17 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<div class="inner-wrapper"> <div class="inner-wrapper">
<section class="content-area"> <div class="content-area">
<article class="content-primary"> <div class="content-primary">
<div class="container-message wrapper-message"></div> <div class="container-message wrapper-message"></div>
<section class="wrapper-xblock level-page is-hidden studio-xblock-wrapper" data-locator="${context_library.location}" data-course-key="${context_library.location.library_key}"> <div class="wrapper-xblock level-page is-hidden studio-xblock-wrapper" data-locator="${context_library.location}" data-course-key="${context_library.location.library_key}">
</section> </div>
<div class="ui-loading"> <div class="ui-loading">
<p><span class="spin"><span class="icon fa fa-refresh" aria-hidden="true"></span></span><span class="copy">${_("Loading")}</span></p> <p><span class="spin"><span class="icon fa fa-refresh" aria-hidden="true"></span></span><span class="copy">${_("Loading")}</span></p>
</div> </div>
</article> </div>
<aside class="content-supplementary" role="complementary"> <div class="content-supplementary" role="complementary">
% if can_edit: % if can_edit:
<div class="bit"> <div class="bit">
<h3 class="title-3">${_("Adding content to your library")}</h3> <h3 class="title-3">${_("Adding content to your library")}</h3>
...@@ -100,8 +100,8 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -100,8 +100,8 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="bit external-help"> <div class="bit external-help">
<a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about content libraries")}</a> <a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about content libraries")}</a>
</div> </div>
</aside> </div>
</section> </div>
</div> </div>
</div> </div>
</%block> </%block>
...@@ -53,10 +53,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -53,10 +53,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</div> </div>
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <div class="content">
<article class="content-primary" role="main"> <div class="content-primary">
<form id="settings_details" class="settings-details" method="post" action=""> <form id="settings_details" class="settings-details" method="post" action="">
<section class="group-settings basic"> <div class="group-settings basic">
<header> <header>
<h2 class="title-2">${_("Basic Information")}</h2> <h2 class="title-2">${_("Basic Information")}</h2>
<span class="tip">${_("The nuts and bolts of your course")}</span> <span class="tip">${_("The nuts and bolts of your course")}</span>
...@@ -124,11 +124,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -124,11 +124,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</div> </div>
</div> </div>
% endif % endif
</section> </div>
<hr class="divide" /> <hr class="divide" />
% if credit_eligibility_enabled and is_credit_course: % if credit_eligibility_enabled and is_credit_course:
<section class="group-settings basic"> <div class="group-settings basic">
<header> <header>
<h2 class="title-2">${_("Course Credit Requirements")}</h2> <h2 class="title-2">${_("Course Credit Requirements")}</h2>
<span class="tip">${_("Steps required to earn course credit")}</span> <span class="tip">${_("Steps required to earn course credit")}</span>
...@@ -173,11 +173,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -173,11 +173,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
% else: % else:
<p>No credit requirements found.</p> <p>No credit requirements found.</p>
% endif % endif
</section> </div>
<hr class="divide" /> <hr class="divide" />
% endif % endif
<section class="group-settings schedule"> <div class="group-settings schedule">
<header> <header>
<h2 class="title-2">${_('Course Schedule')}</h2> <h2 class="title-2">${_('Course Schedule')}</h2>
<span class="tip">${_('Dates that control when your course can be viewed')}</span> <span class="tip">${_('Dates that control when your course can be viewed')}</span>
...@@ -267,10 +267,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -267,10 +267,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</div> </div>
</div> </div>
% endif % endif
</section> </div>
% if about_page_editable: % if about_page_editable:
<section class="group-settings course_details"> <div class="group-settings course_details">
<header> <header>
<h2 class="title-2">${_('Course Details')}</h2> <h2 class="title-2">${_('Course Details')}</h2>
<span class="tip">${_('Provide useful information about your course')}</span> <span class="tip">${_('Provide useful information about your course')}</span>
...@@ -287,11 +287,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -287,11 +287,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
<span class="tip tip-stacked">${_("Identify the course language here. This is used to assist users find courses that are taught in a specific language.")}</span> <span class="tip tip-stacked">${_("Identify the course language here. This is used to assist users find courses that are taught in a specific language.")}</span>
</li> </li>
</ol> </ol>
</section> </div>
% endif % endif
<hr class="divide" /> <hr class="divide" />
<section class="group-settings marketing"> <div class="group-settings marketing">
<header> <header>
<h2 class="title-2">${_("Introducing Your Course")}</h2> <h2 class="title-2">${_("Introducing Your Course")}</h2>
<span class="tip">${_("Information for prospective students")}</span> <span class="tip">${_("Information for prospective students")}</span>
...@@ -462,11 +462,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -462,11 +462,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</li> </li>
% endif % endif
</ol> </ol>
</section> </div>
% if enable_extended_course_details: % if enable_extended_course_details:
<hr class="divide" /> <hr class="divide" />
<section class="group-settings course-learning-info"> <div class="group-settings course-learning-info">
<header> <header>
<h2 class="title-2">${_("Learning Outcomes")}</h2> <h2 class="title-2">${_("Learning Outcomes")}</h2>
<span class="tip">${_("Add the learning outcomes for this course")}</span> <span class="tip">${_("Add the learning outcomes for this course")}</span>
...@@ -479,10 +479,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -479,10 +479,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
<span class="icon fa fa-plus icon-inline" aria-hidden="true"></span>${_("Add Learning Outcome")} <span class="icon fa fa-plus icon-inline" aria-hidden="true"></span>${_("Add Learning Outcome")}
</button> </button>
</div> </div>
</section> </div>
<hr class="divide" /> <hr class="divide" />
<section class="group-settings instructor-types"> <div class="group-settings instructor-types">
<header> <header>
<h2 class="title-2">${_("Instructors")}</h2> <h2 class="title-2">${_("Instructors")}</h2>
<span class="tip">${_("Add details about the instructors for this course")}</span> <span class="tip">${_("Add details about the instructors for this course")}</span>
...@@ -495,13 +495,13 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -495,13 +495,13 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
<span class="icon fa fa-plus icon-inline" aria-hidden="true"></span>${_("Add Instructor")} <span class="icon fa fa-plus icon-inline" aria-hidden="true"></span>${_("Add Instructor")}
</button> </button>
</div> </div>
</section> </div>
% endif % endif
% if about_page_editable or is_prerequisite_courses_enabled or is_entrance_exams_enabled: % if about_page_editable or is_prerequisite_courses_enabled or is_entrance_exams_enabled:
<hr class="divide" /> <hr class="divide" />
<section class="group-settings requirements"> <div class="group-settings requirements">
<header> <header>
<h2 class="title-2">${_("Requirements")}</h2> <h2 class="title-2">${_("Requirements")}</h2>
<span class="tip">${_("Expectations of the students taking this course")}</span> <span class="tip">${_("Expectations of the students taking this course")}</span>
...@@ -550,14 +550,14 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -550,14 +550,14 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</li> </li>
% endif % endif
</ol> </ol>
</section> </div>
% endif % endif
% if self_paced_enabled: % if self_paced_enabled:
<hr class="divide" /> <hr class="divide" />
<section class="group-settings pacing"> <div class="group-settings pacing">
<header> <header>
<h2 class="title-2">${_("Course Pacing")}</h2> <h2 class="title-2">${_("Course Pacing")}</h2>
<span class="tip">${_("Set the pacing for this course")}</span> <span class="tip">${_("Set the pacing for this course")}</span>
...@@ -576,14 +576,14 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -576,14 +576,14 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
<span class="tip">${_("Self-paced courses do not have release dates for course content or due dates for assignments. Learners can complete course material at any time before the course end date.")}</span> <span class="tip">${_("Self-paced courses do not have release dates for course content or due dates for assignments. Learners can complete course material at any time before the course end date.")}</span>
</li> </li>
</ol> </ol>
</section> </div>
% endif % endif
% if settings.FEATURES.get("LICENSING", False): % if settings.FEATURES.get("LICENSING", False):
<hr class="divide" /> <hr class="divide" />
<section class="group-settings license"> <div class="group-settings license">
<header> <header>
<h2 class="title-2">${_("Course Content License")}</h2> <h2 class="title-2">${_("Course Content License")}</h2>
## Translators: At the course settings, the editor is able to select the default course content license. ## Translators: At the course settings, the editor is able to select the default course content license.
...@@ -597,11 +597,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -597,11 +597,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
<div id="course-license-selector"></div> <div id="course-license-selector"></div>
</li> </li>
</ol> </ol>
</section> </div>
% endif % endif
</form> </form>
</article> </div>
<aside class="content-supplementary" role="complementary"> <div class="content-supplementary" role="complementary">
<div class="bit"> <div class="bit">
<h3 class="title-3">${_("How are these settings used?")}</h3> <h3 class="title-3">${_("How are these settings used?")}</h3>
<p>${_("Your course's schedule determines when students can enroll in and begin a course.")}</p> <p>${_("Your course's schedule determines when students can enroll in and begin a course.")}</p>
...@@ -627,7 +627,7 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}' ...@@ -627,7 +627,7 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</nav> </nav>
% endif % endif
</div> </div>
</aside> </div>
</section> </div>
</div> </div>
</%block> </%block>
...@@ -14,10 +14,8 @@ from django.core.urlresolvers import reverse ...@@ -14,10 +14,8 @@ from django.core.urlresolvers import reverse
</ul> </ul>
<div class="wrapper-inner wrapper"> <div class="wrapper-inner wrapper">
<section class="sock" id="sock"> <section class="sock" id="sock" aria-labelledby="sock-heading">
<header> <h2 id="sock-heading" class="title sr">${_("{studio_name} Documentation").format(studio_name=settings.STUDIO_NAME)}</h2>
<h2 class="title sr">${_("{studio_name} Documentation").format(studio_name=settings.STUDIO_NAME)}</h2>
</header>
<div class="support"> <div class="support">
<%! <%!
......
...@@ -53,12 +53,12 @@ def i_visit_the_homepage(step): ...@@ -53,12 +53,12 @@ def i_visit_the_homepage(step):
@step(u'I (?:visit|access|open) the dashboard$') @step(u'I (?:visit|access|open) the dashboard$')
def i_visit_the_dashboard(step): def i_visit_the_dashboard(step):
world.visit('/dashboard') world.visit('/dashboard')
assert world.is_css_present('section.container.dashboard') assert world.is_css_present('.container.dashboard')
@step('I should be on the dashboard page$') @step('I should be on the dashboard page$')
def i_should_be_on_the_dashboard(step): def i_should_be_on_the_dashboard(step):
assert world.is_css_present('section.container.dashboard') assert world.is_css_present('.container.dashboard')
assert 'Dashboard' in world.browser.title assert 'Dashboard' in world.browser.title
...@@ -166,7 +166,7 @@ def i_am_logged_in(step): ...@@ -166,7 +166,7 @@ def i_am_logged_in(step):
world.create_user('robot', 'test') world.create_user('robot', 'test')
world.log_in(username='robot', password='test') world.log_in(username='robot', password='test')
world.browser.visit(lettuce.django.django_url('/')) world.browser.visit(lettuce.django.django_url('/'))
dash_css = 'section.container.dashboard' dash_css = '.container.dashboard'
assert world.is_css_present(dash_css) assert world.is_css_present(dash_css)
......
...@@ -22,7 +22,7 @@ class DashboardPage(PageObject): ...@@ -22,7 +22,7 @@ class DashboardPage(PageObject):
url = "{base}/dashboard".format(base=BASE_URL) url = "{base}/dashboard".format(base=BASE_URL)
def is_browser_on_page(self): def is_browser_on_page(self):
return self.q(css='section.my-courses').present return self.q(css='.my-courses').present
@property @property
def current_courses_text(self): def current_courses_text(self):
...@@ -31,7 +31,7 @@ class DashboardPage(PageObject): ...@@ -31,7 +31,7 @@ class DashboardPage(PageObject):
shows all the courses that the student is enrolled in. shows all the courses that the student is enrolled in.
The string displayed is defined in lms/templates/dashboard.html. The string displayed is defined in lms/templates/dashboard.html.
""" """
text_items = self.q(css='section#my-courses').text text_items = self.q(css='#my-courses').text
if len(text_items) > 0: if len(text_items) > 0:
return text_items[0] return text_items[0]
else: else:
......
...@@ -113,7 +113,7 @@ class SettingsPage(CoursePage): ...@@ -113,7 +113,7 @@ class SettingsPage(CoursePage):
Property. Returns the text of the license type for the course Property. Returns the text of the license type for the course
("All Rights Reserved" or "Creative Commons") ("All Rights Reserved" or "Creative Commons")
""" """
license_types_css = "section.license ul.license-types li.license-type" license_types_css = ".license ul.license-types li.license-type"
self.wait_for_element_presence( self.wait_for_element_presence(
license_types_css, license_types_css,
"license type buttons are present", "license type buttons are present",
...@@ -124,7 +124,7 @@ class SettingsPage(CoursePage): ...@@ -124,7 +124,7 @@ class SettingsPage(CoursePage):
# Look for the license text that will be displayed by default, # Look for the license text that will be displayed by default,
# if no button is yet explicitly selected # if no button is yet explicitly selected
license_text = self.q(css='section.license span.license-text') license_text = self.q(css='.license span.license-text')
if license_text.is_present(): if license_text.is_present():
return license_text.text[0] return license_text.text[0]
return None return None
...@@ -135,13 +135,13 @@ class SettingsPage(CoursePage): ...@@ -135,13 +135,13 @@ class SettingsPage(CoursePage):
Sets the course license to the given license_name Sets the course license to the given license_name
(str, "All Rights Reserved" or "Creative Commons") (str, "All Rights Reserved" or "Creative Commons")
""" """
license_types_css = "section.license ul.license-types li.license-type" license_types_css = ".license ul.license-types li.license-type"
self.wait_for_element_presence( self.wait_for_element_presence(
license_types_css, license_types_css,
"license type buttons are present", "license type buttons are present",
) )
button_xpath = ( button_xpath = (
"//section[contains(@class, 'license')]" "//div[contains(@class, 'license')]"
"//ul[contains(@class, 'license-types')]" "//ul[contains(@class, 'license-types')]"
"//li[contains(@class, 'license-type')]" "//li[contains(@class, 'license-type')]"
"//button[contains(text(),'{license_name}')]" "//button[contains(text(),'{license_name}')]"
...@@ -151,7 +151,7 @@ class SettingsPage(CoursePage): ...@@ -151,7 +151,7 @@ class SettingsPage(CoursePage):
raise Exception("Invalid license name: {name}".format(name=license_name)) raise Exception("Invalid license name: {name}".format(name=license_name))
button.click() button.click()
pacing_css = 'section.pacing input[type=radio]' pacing_css = '.pacing input[type=radio]'
@property @property
def checked_pacing_css(self): def checked_pacing_css(self):
......
...@@ -482,7 +482,6 @@ class AccountSettingsA11yTest(AccountSettingsTestMixin, WebAppTest): ...@@ -482,7 +482,6 @@ class AccountSettingsA11yTest(AccountSettingsTestMixin, WebAppTest):
self.visit_account_settings_page() self.visit_account_settings_page()
self.account_settings_page.a11y_audit.config.set_rules({ self.account_settings_page.a11y_audit.config.set_rules({
'ignore': [ 'ignore': [
'section', # TODO: AC-491
'link-href', # TODO: AC-233 'link-href', # TODO: AC-233
], ],
}) })
......
...@@ -779,7 +779,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest): ...@@ -779,7 +779,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
profile_page.a11y_audit.config.set_rules({ profile_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'section', # TODO: AC-491
'link-href', # TODO: AC-231 'link-href', # TODO: AC-231
], ],
}) })
...@@ -807,7 +806,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest): ...@@ -807,7 +806,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
profile_page.a11y_audit.config.set_rules({ profile_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'section', # TODO: AC-491
'link-href', # TODO: AC-231 'link-href', # TODO: AC-231
], ],
}) })
...@@ -824,7 +822,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest): ...@@ -824,7 +822,6 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest):
profile_page.a11y_audit.config.set_rules({ profile_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'section', # TODO: AC-491
'link-href', # TODO: AC-231 'link-href', # TODO: AC-231
], ],
}) })
......
...@@ -1347,9 +1347,4 @@ class CourseInfoA11yTest(UniqueCourseTest): ...@@ -1347,9 +1347,4 @@ class CourseInfoA11yTest(UniqueCourseTest):
def test_course_home_a11y(self): def test_course_home_a11y(self):
self.course_info_page.visit() self.course_info_page.visit()
self.course_info_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.course_info_page.a11y_audit.check_for_accessibility_errors() self.course_info_page.a11y_audit.check_for_accessibility_errors()
...@@ -648,11 +648,6 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin): ...@@ -648,11 +648,6 @@ class CoursewareMultipleVerticalsTest(UniqueCourseTest, EventsTestMixin):
# Set the scope to the sequence navigation # Set the scope to the sequence navigation
self.courseware_page.a11y_audit.config.set_scope( self.courseware_page.a11y_audit.config.set_scope(
include=['div.sequence-nav']) include=['div.sequence-nav'])
self.courseware_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
],
})
self.courseware_page.a11y_audit.check_for_accessibility_errors() self.courseware_page.a11y_audit.check_for_accessibility_errors()
......
...@@ -232,9 +232,4 @@ class LmsDashboardA11yTest(BaseLmsDashboardTest): ...@@ -232,9 +232,4 @@ class LmsDashboardA11yTest(BaseLmsDashboardTest):
""" """
course_listings = self.dashboard_page.get_course_listings() course_listings = self.dashboard_page.get_course_listings()
self.assertEqual(len(course_listings), 1) self.assertEqual(len(course_listings), 1)
self.dashboard_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.dashboard_page.a11y_audit.check_for_accessibility_errors() self.dashboard_page.a11y_audit.check_for_accessibility_errors()
...@@ -122,12 +122,6 @@ class ProgramListingPageA11yTest(ProgramPageBase): ...@@ -122,12 +122,6 @@ class ProgramListingPageA11yTest(ProgramPageBase):
self.assertTrue(self.listing_page.is_sidebar_present) self.assertTrue(self.listing_page.is_sidebar_present)
self.assertFalse(self.listing_page.are_cards_present) self.assertFalse(self.listing_page.are_cards_present)
self.listing_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.listing_page.a11y_audit.check_for_accessibility_errors() self.listing_page.a11y_audit.check_for_accessibility_errors()
def test_cards_a11y(self): def test_cards_a11y(self):
...@@ -137,12 +131,6 @@ class ProgramListingPageA11yTest(ProgramPageBase): ...@@ -137,12 +131,6 @@ class ProgramListingPageA11yTest(ProgramPageBase):
self.assertTrue(self.listing_page.is_sidebar_present) self.assertTrue(self.listing_page.is_sidebar_present)
self.assertTrue(self.listing_page.are_cards_present) self.assertTrue(self.listing_page.are_cards_present)
self.listing_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.listing_page.a11y_audit.check_for_accessibility_errors() self.listing_page.a11y_audit.check_for_accessibility_errors()
...@@ -161,10 +149,4 @@ class ProgramDetailsPageA11yTest(ProgramPageBase): ...@@ -161,10 +149,4 @@ class ProgramDetailsPageA11yTest(ProgramPageBase):
"""Test the page's a11y compliance.""" """Test the page's a11y compliance."""
self.auth() self.auth()
self.details_page.visit() self.details_page.visit()
self.details_page.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.details_page.a11y_audit.check_for_accessibility_errors() self.details_page.a11y_audit.check_for_accessibility_errors()
...@@ -656,7 +656,6 @@ class StudioLibraryA11yTest(StudioLibraryTest): ...@@ -656,7 +656,6 @@ class StudioLibraryA11yTest(StudioLibraryTest):
# we will ignore this error in the test until we fix them. # we will ignore this error in the test until we fix them.
lib_page.a11y_audit.config.set_rules({ lib_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'section', # TODO: AC-491
'color-contrast', # TODO: AC-225 'color-contrast', # TODO: AC-225
'link-href', # TODO: AC-226 'link-href', # TODO: AC-226
'nav-aria-label', # TODO: AC-227 'nav-aria-label', # TODO: AC-227
......
...@@ -503,7 +503,6 @@ class StudioSettingsA11yTest(StudioCourseTest): ...@@ -503,7 +503,6 @@ class StudioSettingsA11yTest(StudioCourseTest):
# we will ignore this error in the test until we fix them. # we will ignore this error in the test until we fix them.
self.settings_page.a11y_audit.config.set_rules({ self.settings_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'section', # TODO: AC-491
'color-contrast', # TODO: AC-225 'color-contrast', # TODO: AC-225
'link-href', # TODO: AC-226 'link-href', # TODO: AC-226
'nav-aria-label', # TODO: AC-227 'nav-aria-label', # TODO: AC-227
...@@ -580,11 +579,6 @@ class StudioSubsectionSettingsA11yTest(StudioCourseTest): ...@@ -580,11 +579,6 @@ class StudioSubsectionSettingsA11yTest(StudioCourseTest):
self.course_outline.a11y_audit.config.set_scope( self.course_outline.a11y_audit.config.set_scope(
include=['section.edit-settings-timed-examination'] include=['section.edit-settings-timed-examination']
) )
self.course_outline.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.course_outline.a11y_audit.check_for_accessibility_errors() self.course_outline.a11y_audit.check_for_accessibility_errors()
......
...@@ -358,9 +358,4 @@ class CMSVideoA11yTest(CMSVideoBaseTest): ...@@ -358,9 +358,4 @@ class CMSVideoA11yTest(CMSVideoBaseTest):
self.outline.a11y_audit.config.set_scope( self.outline.a11y_audit.config.set_scope(
include=["div.video"] include=["div.video"]
) )
self.outline.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.outline.a11y_audit.check_for_accessibility_errors() self.outline.a11y_audit.check_for_accessibility_errors()
...@@ -1272,9 +1272,4 @@ class LMSVideoModuleA11yTest(VideoBaseTest): ...@@ -1272,9 +1272,4 @@ class LMSVideoModuleA11yTest(VideoBaseTest):
self.video.a11y_audit.config.set_scope( self.video.a11y_audit.config.set_scope(
include=["div.video"] include=["div.video"]
) )
self.video.a11y_audit.config.set_rules({
"ignore": [
'section', # TODO: AC-491
]
})
self.video.a11y_audit.check_for_accessibility_errors() self.video.a11y_audit.check_for_accessibility_errors()
...@@ -9,15 +9,15 @@ import time ...@@ -9,15 +9,15 @@ import time
def i_register_for_the_course(_step, course): def i_register_for_the_course(_step, course):
url = django_url('courses/%s/about' % world.scenario_dict['COURSE'].id.to_deprecated_string()) url = django_url('courses/%s/about' % world.scenario_dict['COURSE'].id.to_deprecated_string())
world.browser.visit(url) world.browser.visit(url)
world.css_click('section.intro a.register') world.css_click('.intro a.register')
assert world.is_css_present('section.container.dashboard') assert world.is_css_present('.container.dashboard')
@step('I register to audit the course$') @step('I register to audit the course$')
def i_register_to_audit_the_course(_step): def i_register_to_audit_the_course(_step):
url = django_url('courses/%s/about' % world.scenario_dict['COURSE'].id.to_deprecated_string()) url = django_url('courses/%s/about' % world.scenario_dict['COURSE'].id.to_deprecated_string())
world.browser.visit(url) world.browser.visit(url)
world.css_click('section.intro a.register') world.css_click('.intro a.register')
# When the page first loads some animation needs to # When the page first loads some animation needs to
# complete before this button is in a stable location # complete before this button is in a stable location
world.retry_on_exception( world.retry_on_exception(
...@@ -26,18 +26,18 @@ def i_register_to_audit_the_course(_step): ...@@ -26,18 +26,18 @@ def i_register_to_audit_the_course(_step):
ignored_exceptions=AttributeError ignored_exceptions=AttributeError
) )
time.sleep(1) time.sleep(1)
assert world.is_css_present('section.container.dashboard') assert world.is_css_present('.container.dashboard')
@step(u'I should see an empty dashboard message') @step(u'I should see an empty dashboard message')
def i_should_see_empty_dashboard(_step): def i_should_see_empty_dashboard(_step):
empty_dash_css = 'section.empty-dashboard-message' empty_dash_css = '.empty-dashboard-message'
assert world.is_css_present(empty_dash_css) assert world.is_css_present(empty_dash_css)
@step(u'I should( NOT)? see the course numbered "([^"]*)" in my dashboard$') @step(u'I should( NOT)? see the course numbered "([^"]*)" in my dashboard$')
def i_should_see_that_course_in_my_dashboard(_step, doesnt_appear, course): def i_should_see_that_course_in_my_dashboard(_step, doesnt_appear, course):
course_link_css = 'section.my-courses a[href*="%s"]' % course course_link_css = '.my-courses a[href*="%s"]' % course
if doesnt_appear: if doesnt_appear:
assert world.is_css_not_present(course_link_css) assert world.is_css_not_present(course_link_css)
else: else:
...@@ -54,6 +54,6 @@ def i_unenroll_from_that_course(_step, course): ...@@ -54,6 +54,6 @@ def i_unenroll_from_that_course(_step, course):
assert world.is_css_present(unregister_css) assert world.is_css_present(unregister_css)
world.css_click(unregister_css) world.css_click(unregister_css)
button_css = 'section#unenroll-modal input[value="Unenroll"]' button_css = '#unenroll-modal input[value="Unenroll"]'
assert world.is_css_present(button_css) assert world.is_css_present(button_css)
world.css_click(button_css) world.css_click(button_css)
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
<span class="xseries-icon" aria-hidden="true"></span> <span class="xseries-icon" aria-hidden="true"></span>
<p class="message-copy">XSeries Program Course</p> <p class="message-copy">XSeries Program Course</p>
</div> </div>
<article class="course honor"> <div class="course honor">
<section class="details"> <section class="details" aria-labelledby="course-details-heading">
<h2 class="hd hd-2 sr" id="course-details-heading">Course details</h2>
<div class="wrapper-course-image" aria-hidden="true"> <div class="wrapper-course-image" aria-hidden="true">
<a class="cover"> <a class="cover">
<img src="/asset-v1:DelftX+CTB3365DWx+1T2016+type@asset+block@Delftx_water_course_image2.jpg" class="course-image" alt="CTB3365DWx Introduction to Drinking Water Treatment Cover Image"> <img src="/asset-v1:DelftX+CTB3365DWx+1T2016+type@asset+block@Delftx_water_course_image2.jpg" class="course-image" alt="CTB3365DWx Introduction to Drinking Water Treatment Cover Image">
...@@ -114,15 +115,15 @@ ...@@ -114,15 +115,15 @@
</div> </div>
</ul> </ul>
</footer> </footer>
</article> </div>
</div> </div>
<div class="course-container"> <div class="course-container">
<div class="label-xseries-association"> <div class="label-xseries-association">
<span class="xseries-icon" aria-hidden="true"></span> <span class="xseries-icon" aria-hidden="true"></span>
<p class="message-copy">XSeries Program Course</p> <p class="message-copy">XSeries Program Course</p>
</div> </div>
<article class="course honor"> <div class="course honor">
<section class="details"> <div class="details">
<div class="wrapper-course-image" aria-hidden="true"> <div class="wrapper-course-image" aria-hidden="true">
<a class="cover"> <a class="cover">
<img src="/asset-v1:DelftX+CTB3365DWx+1T2016+type@asset+block@Delftx_water_course_image2.jpg" class="course-image" alt="CTB3365DWx Introduction to Drinking Water Treatment Cover Image"> <img src="/asset-v1:DelftX+CTB3365DWx+1T2016+type@asset+block@Delftx_water_course_image2.jpg" class="course-image" alt="CTB3365DWx Introduction to Drinking Water Treatment Cover Image">
...@@ -163,7 +164,7 @@ ...@@ -163,7 +164,7 @@
</div> </div>
</div> </div>
</div> </div>
</section> </div>
<footer class="wrapper-messages-primary"> <footer class="wrapper-messages-primary">
<ul class="messages-list"> <ul class="messages-list">
<div class="message message-upsell has-actions is-shown"> <div class="message message-upsell has-actions is-shown">
...@@ -203,5 +204,5 @@ ...@@ -203,5 +204,5 @@
</div> </div>
</ul> </ul>
</footer> </footer>
</article> </div>
</div> </div>
...@@ -202,8 +202,8 @@ from openedx.core.lib.courses import course_image_url ...@@ -202,8 +202,8 @@ from openedx.core.lib.courses import course_image_url
</div> </div>
</header> </header>
<section class="container"> <div class="container">
<section class="details"> <div class="details">
% if staff_access and studio_url is not None: % if staff_access and studio_url is not None:
<div class="wrap-instructor-info studio-view"> <div class="wrap-instructor-info studio-view">
<a class="instructor-info-action" href="${studio_url}">${_("View About Page in studio")}</a> <a class="instructor-info-action" href="${studio_url}">${_("View About Page in studio")}</a>
...@@ -213,10 +213,10 @@ from openedx.core.lib.courses import course_image_url ...@@ -213,10 +213,10 @@ from openedx.core.lib.courses import course_image_url
<div class="inner-wrapper"> <div class="inner-wrapper">
${get_course_about_section(request, course, "overview")} ${get_course_about_section(request, course, "overview")}
</div> </div>
</section> </div>
<section class="course-sidebar"> <div class="course-sidebar">
<section class="course-summary"> <div class="course-summary">
<%include file="course_about_sidebar_header.html" /> <%include file="course_about_sidebar_header.html" />
...@@ -275,7 +275,7 @@ from openedx.core.lib.courses import course_image_url ...@@ -275,7 +275,7 @@ from openedx.core.lib.courses import course_image_url
<li class="important-dates-item"><span class="icon fa fa-book" aria-hidden="true"></span><p class="important-dates-item-title">${_("Requirements")}</p><span class="important-dates-item-text prerequisites">${get_course_about_section(request, course, "prerequisites")}</span></li> <li class="important-dates-item"><span class="icon fa fa-book" aria-hidden="true"></span><p class="important-dates-item-title">${_("Requirements")}</p><span class="important-dates-item-text prerequisites">${get_course_about_section(request, course, "prerequisites")}</span></li>
% endif % endif
</ol> </ol>
</section> </div>
## CourseTalk widget ## CourseTalk widget
% if show_coursetalk_widget: % if show_coursetalk_widget:
...@@ -286,23 +286,23 @@ from openedx.core.lib.courses import course_image_url ...@@ -286,23 +286,23 @@ from openedx.core.lib.courses import course_image_url
## For now, ocw links are the only thing that goes in additional resources ## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(request, course, "ocw_links"): % if get_course_about_section(request, course, "ocw_links"):
<section class="additional-resources"> <div class="additional-resources">
<header> <header>
<h1>${_("Additional Resources")}</h1> <h1>${_("Additional Resources")}</h1>
</header> </div>
<section> <div>
## "MITOpenCourseware" should *not* be translated ## "MITOpenCourseware" should *not* be translated
<h2 class="opencourseware">MITOpenCourseware</h2> <h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(request, course, "ocw_links")} ${get_course_about_section(request, course, "ocw_links")}
</section> </div>
</section> </div>
%endif %endif
</section> </div>
</section> </div>
</section> </div>
## Need to put this hidden form on the page so that the registration button works. ## Need to put this hidden form on the page so that the registration button works.
## Since it's no harm to display a hidden form, we display it with the most permissive conditional ## Since it's no harm to display a hidden form, we display it with the most permissive conditional
......
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<section> <section aria-labelledby="course-updates-heading">
<h2 class="hd hd-2 sr" id="course-updates-heading">${_('All course updates')}</h2>
<div class="recent-updates"> <div class="recent-updates">
% for index, update in enumerate(visible_updates): % for index, update in enumerate(visible_updates):
<article class="updates-article"> <article class="updates-article">
......
...@@ -55,7 +55,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -55,7 +55,7 @@ from openedx.core.djangolib.markup import HTML, Text
<%block name="bodyclass">view-in-course view-course-info ${course.css_class or ''}</%block> <%block name="bodyclass">view-in-course view-course-info ${course.css_class or ''}</%block>
<main id="main" aria-label="Content" tabindex="-1"> <main id="main" aria-label="Content" tabindex="-1">
<section class="container"> <div class="container">
<div class="home"> <div class="home">
<div class="page-header-main"> <div class="page-header-main">
<h1 class="page-title">${_("Welcome to {org}'s {course_name}!").format(org=course.display_org_with_default, course_name=course.display_number_with_default)}</h1> <h1 class="page-title">${_("Welcome to {org}'s {course_name}!").format(org=course.display_org_with_default, course_name=course.display_number_with_default)}</h1>
...@@ -108,5 +108,5 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -108,5 +108,5 @@ from openedx.core.djangolib.markup import HTML, Text
</section> </section>
% endif % endif
</div> </div>
</section> </div>
</main> </main>
...@@ -63,21 +63,21 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -63,21 +63,21 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="dashboard-notifications" tabindex="-1"> <div class="dashboard-notifications" tabindex="-1">
%if message: %if message:
<section class="dashboard-banner"> <div class="dashboard-banner">
${message | n, decode.utf8} ${message | n, decode.utf8}
</section> </div>
%endif %endif
%if enrollment_message: %if enrollment_message:
<section class="dashboard-banner"> <div class="dashboard-banner">
${enrollment_message | n, decode.utf8} ${enrollment_message | n, decode.utf8}
</section> </div>
%endif %endif
</div> </div>
<main id="main" aria-label="Content" tabindex="-1"> <main id="main" aria-label="Content" tabindex="-1">
<section class="container dashboard" id="dashboard-main"> <div class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-courses"> <div class="my-courses" id="my-courses">
<header class="wrapper-header-courses"> <header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2> <h2 class="header-courses">${_("My Courses")}</h2>
</header> </header>
...@@ -104,7 +104,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -104,7 +104,7 @@ from openedx.core.djangolib.markup import HTML, Text
</ul> </ul>
% else: % else:
<section class="empty-dashboard-message"> <div class="empty-dashboard-message">
<p>${_("You are not enrolled in any courses yet.")}</p> <p>${_("You are not enrolled in any courses yet.")}</p>
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'): % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
...@@ -113,7 +113,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -113,7 +113,7 @@ from openedx.core.djangolib.markup import HTML, Text
</a> </a>
%endif %endif
</section> </div>
% endif % endif
% if staff_access and len(errored_courses) > 0: % if staff_access and len(errored_courses) > 0:
...@@ -132,7 +132,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -132,7 +132,7 @@ from openedx.core.djangolib.markup import HTML, Text
% endfor % endfor
</div> </div>
% endif % endif
</section> </div>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
<div id="dashboard-search-bar" class="search-bar dashboard-search-bar" role="search" aria-label="Dashboard"> <div id="dashboard-search-bar" class="search-bar dashboard-search-bar" role="search" aria-label="Dashboard">
...@@ -152,14 +152,14 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -152,14 +152,14 @@ from openedx.core.djangolib.markup import HTML, Text
% endif % endif
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
<section id="dashboard-search-results" class="search-results dashboard-search-results"></section> <div id="dashboard-search-results" class="search-results dashboard-search-results"></div>
% endif % endif
<section class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info"> <div class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info">
<header class="profile"> <header class="profile">
<h2 class="account-status-title sr">${_("Account Status Info")}: </h2> <h2 class="account-status-title sr">${_("Account Status Info")}: </h2>
</header> </header>
<section class="user-info"> <div class="user-info">
<ul> <ul>
% if len(order_history_list): % if len(order_history_list):
...@@ -174,12 +174,12 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -174,12 +174,12 @@ from openedx.core.djangolib.markup import HTML, Text
<%include file="${static.get_template_path('dashboard/_dashboard_status_verification.html')}" /> <%include file="${static.get_template_path('dashboard/_dashboard_status_verification.html')}" />
</ul> </ul>
</section> </div>
</section> </div>
</section> </div>
</main> </main>
<section id="email-settings-modal" class="modal" aria-hidden="true"> <div id="email-settings-modal" class="modal" aria-hidden="true">
<div class="inner-wrapper" role="dialog" aria-labelledby="email-settings-title"> <div class="inner-wrapper" role="dialog" aria-labelledby="email-settings-title">
<button class="close-modal"> <button class="close-modal">
<span class="icon fa fa-remove" aria-hidden="true"></span> <span class="icon fa fa-remove" aria-hidden="true"></span>
...@@ -208,9 +208,9 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -208,9 +208,9 @@ from openedx.core.djangolib.markup import HTML, Text
</div> </div>
</form> </form>
</div> </div>
</section> </div>
<section id="unenroll-modal" class="modal unenroll-modal" aria-hidden="true"> <div id="unenroll-modal" class="modal unenroll-modal" aria-hidden="true">
<div class="inner-wrapper" role="dialog" aria-labelledby="unenrollment-modal-title"> <div class="inner-wrapper" role="dialog" aria-labelledby="unenrollment-modal-title">
<button class="close-modal"> <button class="close-modal">
<span class="icon fa fa-remove" aria-hidden="true"></span> <span class="icon fa fa-remove" aria-hidden="true"></span>
...@@ -240,4 +240,4 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -240,4 +240,4 @@ from openedx.core.djangolib.markup import HTML, Text
</div> </div>
</form> </form>
</div> </div>
</section> </div>
...@@ -61,7 +61,8 @@ from student.helpers import ( ...@@ -61,7 +61,8 @@ from student.helpers import (
% endif % endif
<article class="course${mode_class}"> <article class="course${mode_class}">
<% course_target = reverse('info', args=[unicode(course_overview.id)]) %> <% course_target = reverse('info', args=[unicode(course_overview.id)]) %>
<section class="details"> <section class="details" aria-labelledby="details-heading-${course_overview.number}">
<h2 class="hd hd-2 sr" id="details-heading-${course_overview.number}">${_('Course details')}</h2>
<div class="wrapper-course-image" aria-hidden="true"> <div class="wrapper-course-image" aria-hidden="true">
% if show_courseware_link: % if show_courseware_link:
% if not is_course_blocked: % if not is_course_blocked:
......
...@@ -19,23 +19,23 @@ from openedx.core.djangolib.js_utils import js_escaped_string ...@@ -19,23 +19,23 @@ from openedx.core.djangolib.js_utils import js_escaped_string
<div class="focus_grabber first"></div> <div class="focus_grabber first"></div>
<div class="tc-wrapper"> <div class="tc-wrapper">
<article class="video-wrapper"> <div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="${_('Loading video player')}"></span> <span tabindex="0" class="spinner" aria-hidden="false" aria-label="${_('Loading video player')}"></span>
<span tabindex="-1" class="btn-play is-hidden" aria-hidden="true" aria-label="${_('Play video')}"></span> <span tabindex="-1" class="btn-play is-hidden" aria-hidden="true" aria-label="${_('Play video')}"></span>
<div class="video-player-pre"></div> <div class="video-player-pre"></div>
<section class="video-player"> <div class="video-player">
<div id="${id}"></div> <div id="${id}"></div>
<h4 class="hd hd-4 video-error is-hidden">${_('No playable video sources found.')}</h4> <h4 class="hd hd-4 video-error is-hidden">${_('No playable video sources found.')}</h4>
</section> </div>
<div class="video-player-post"></div> <div class="video-player-post"></div>
<div class="closed-captions"></div> <div class="closed-captions"></div>
<section class="video-controls is-hidden"> <div class="video-controls is-hidden">
<div> <div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div> <div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div> <div class="secondary-controls"></div>
</div> </div>
</section> </div>
</article> </div>
</div> </div>
<div class="focus_grabber last"></div> <div class="focus_grabber last"></div>
...@@ -113,4 +113,4 @@ from openedx.core.djangolib.js_utils import js_escaped_string ...@@ -113,4 +113,4 @@ from openedx.core.djangolib.js_utils import js_escaped_string
initializeCDNExperiment(); initializeCDNExperiment();
} }
</script> </script>
% endif; % endif;
\ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
%> %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<section id="video-modal" class="modal video-modal"> <div id="video-modal" class="modal video-modal">
<div class="inner-wrapper"> <div class="inner-wrapper">
${get_course_about_section(request, course, "video")} ${get_course_about_section(request, course, "video")}
</div> </div>
</section> </div>
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