Removed inappropriate section tags. Because screen readers announce each section, they should not be used unless they are actually defining meaningful sections.

This commit is contained in:
Dave St.Germain
2014-01-31 16:31:56 -05:00
parent 9132009fd3
commit a6797899da
29 changed files with 78 additions and 79 deletions

View File

@@ -139,7 +139,7 @@ class AnnotatableSteps(object):
self.active_problem = problem
def active_problem_selector(self, subselector):
return 'section[data-problem-id="{}"] {}'.format(
return 'div[data-problem-id="{}"] {}'.format(
world.scenario_dict['PROBLEMS'][self.active_problem].location.url(),
subselector,
)

View File

@@ -121,7 +121,7 @@ def press_the_button_with_label(_step, buttonname):
@step(u'The "([^"]*)" button does( not)? appear')
def action_button_present(_step, buttonname, doesnt_appear):
button_css = 'section.action input[value*="%s"]' % buttonname
button_css = 'div.action input[value*="%s"]' % buttonname
if bool(doesnt_appear):
assert world.is_css_not_present(button_css)
else:
@@ -141,7 +141,7 @@ def see_score(_step, score):
# The problem progress is changed by
# cms/static/xmodule_js/src/capa/display.js
# so give it some time to render on the page.
score_css = 'section.problem-progress'
score_css = 'div.problem-progress'
expected_text = '({})'.format(score)
world.wait_for(lambda _: world.css_has_text(score_css, expected_text))

View File

@@ -406,7 +406,7 @@ class TestHtmlModifiers(ModuleStoreTestCase):
)
result_fragment = module.render('student_view')
self.assertIn('section class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
self.assertIn('div class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
def test_xmodule_display_wrapper_disabled(self):
module = render.get_module(
@@ -419,7 +419,7 @@ class TestHtmlModifiers(ModuleStoreTestCase):
)
result_fragment = module.render('student_view')
self.assertNotIn('section class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
self.assertNotIn('div class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
def test_static_link_rewrite(self):
module = render.get_module(