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

@@ -76,6 +76,7 @@ def wrap_xblock(runtime_class, block, view, frag, context, display_name_only=Fal
template_context = {
'content': block.display_name if display_name_only else frag.content,
'classes': css_classes,
'display_name': block.display_name_with_default,
'data_attributes': ' '.join(u'data-{}="{}"'.format(key, value) for key, value in data.items()),
}

View File

@@ -29,7 +29,7 @@ iframe[seamless]{
color: darken($error-red, 11%);
}
section.problem-progress {
div.problem-progress {
display: inline-block;
padding-left: 5px;
color: #999;
@@ -37,7 +37,7 @@ section.problem-progress {
font-size: em(16);
}
section.problem {
div.problem {
@media print {
display: block;
padding: 0;
@@ -579,7 +579,7 @@ section.problem {
border: 1px solid #ccc;
}
section.action {
div.action {
margin-top: $baseline;
.save, .check, .show, .reset {

View File

@@ -818,7 +818,7 @@ section.open-ended-child {
width: auto;
}
section.action {
div.action {
margin-top: $baseline;
input.save {

View File

@@ -393,7 +393,7 @@ nav.sequence-bottom {
}
}
.xmodule_VerticalModule ol.vert-mod > li ul.sequence-nav-buttons {
.xmodule_VerticalModule div.vert-mod > div ul.sequence-nav-buttons {
list-style: none !important;
}

View File

@@ -29,7 +29,7 @@
</div>
</section>
<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>

View File

@@ -1,12 +1,11 @@
<h2 class="problem-header">${_("Problem Header")}</h2>
<section class='problem-progress'>
</section>
<div class='problem-progress'></div>
<section class="problem">
<div class="problem">
<p>${_("Problem Content")}</p>
<section class="action">
<div class="action">
<input type="hidden" name="problem_id" value="1">
<input type="text" name="input_example_1" id="input_example_1" value="" class="math" />
@@ -18,6 +17,6 @@
<input class="save" type="button" value="${_('Save')}">
<button class="show"><span class="show-label">${_("Show Answer(s)")}</span> <span class="sr">(for question(s) above - adjacent to each field)</span></button>
<a href="/courseware/6.002_Spring_2012/${ explain }" class="new-page">${_("Explanation")}</a>
<section class="submission_feedback"></section>
</section>
</section>
<div class="submission_feedback"></div>
</div>
</div>

View File

@@ -52,19 +52,19 @@ describe 'Problem', ->
expect(window.update_schematics).toHaveBeenCalled()
it 'bind answer refresh on button click', ->
expect($('section.action input:button')).toHandleWith 'click', @problem.refreshAnswers
expect($('div.action input:button')).toHandleWith 'click', @problem.refreshAnswers
it 'bind the check button', ->
expect($('section.action input.check')).toHandleWith 'click', @problem.check_fd
expect($('div.action input.check')).toHandleWith 'click', @problem.check_fd
it 'bind the reset button', ->
expect($('section.action input.reset')).toHandleWith 'click', @problem.reset
expect($('div.action input.reset')).toHandleWith 'click', @problem.reset
it 'bind the show button', ->
expect($('section.action button.show')).toHandleWith 'click', @problem.show
expect($('div.action button.show')).toHandleWith 'click', @problem.show
it 'bind the save button', ->
expect($('section.action input.save')).toHandleWith 'click', @problem.save
expect($('div.action input.save')).toHandleWith 'click', @problem.save
it 'bind the math input', ->
expect($('input.math')).toHandleWith 'keyup', @problem.refreshMath

View File

@@ -19,11 +19,11 @@ class @Problem
problem_prefix = @element_id.replace(/problem_/,'')
@inputs = @$("[id^=input_#{problem_prefix}_]")
@$('section.action input:button').click @refreshAnswers
@$('section.action input.check').click @check_fd
@$('section.action input.reset').click @reset
@$('section.action button.show').click @show
@$('section.action input.save').click @save
@$('div.action input:button').click @refreshAnswers
@$('div.action input.check').click @check_fd
@$('div.action input.reset').click @reset
@$('div.action button.show').click @show
@$('div.action input.save').click @save
@bindResetCorrectness()

View File

@@ -272,7 +272,7 @@ function PollMain(el) {
c1 += 1;
if (
(tempEl.tagName.toLowerCase() === 'section') &&
(tempEl.tagName.toLowerCase() === 'div') &&
($(tempEl).hasClass('xmodule_WrapperModule') === true)
) {
_this.wrapperSectionEl = tempEl;

View File

@@ -6,4 +6,4 @@ class @VerticalDescriptor extends XModule.Descriptor
)
save: ->
children: $('.vert-mod li', @element).map((idx, el) -> $(el).data('id')).toArray()
children: $('.vert-mod div', @element).map((idx, el) -> $(el).data('id')).toArray()

View File

@@ -7,4 +7,4 @@ class @WrapperDescriptor extends XModule.Descriptor
)
save: ->
children: $('.vert-mod li', @element).map((idx, el) -> $(el).data('id')).toArray()
children: $('.vert-mod div', @element).map((idx, el) -> $(el).data('id')).toArray()

View File

@@ -1,3 +1,3 @@
<section class="${' '.join(classes)}" ${data_attributes}>
<div class="${' '.join(classes)}" ${data_attributes} aria-label="${display_name}">
${content}
</section>
</div>

View File

@@ -15,7 +15,7 @@ class CourseNavPage(PageObject):
url = None
def is_browser_on_page(self):
return self.is_css_present('section.course-index')
return self.is_css_present('div.course-index')
@property
def sections(self):