Updates to correct a11y issues with CodeMirror

TNL-5281
This commit is contained in:
Albert St. Aubin
2016-11-03 08:25:13 -04:00
parent 5afab424a6
commit be0e0b8eec
4 changed files with 11 additions and 13 deletions

View File

@@ -5,7 +5,9 @@ from openedx.core.djangolib.markup import HTML
%>
<div id="textbox_${id}" class="capa_inputtype textbox cminput">
% if response_data['label']:
<label class="problem-group-label" for="cm-textarea-${id}">${response_data['label']}</label>
<label class="problem-group-label" for="cm-textarea-${id}">${response_data['label']}</label>
% else:
<label class="sr problem-group-label" for="cm-textarea-${id}">${_('Code Editor')}</label>
% endif
<textarea rows="${rows}" cols="${cols}" name="input_${id}"
aria-label="${aria_label}"

View File

@@ -502,15 +502,6 @@ class StudioSettingsA11yTest(StudioCourseTest):
],
})
# TODO: Figure out how to get CodeMirror to pass accessibility testing
# We use the CodeMirror Javascript library to
# add code editing to a number of textarea elements
# on this page. CodeMirror generates markup that does
# not pass our accessibility testing rules.
self.settings_page.a11y_audit.config.set_scope(
exclude=['.CodeMirror textarea'] # TODO: TNL-5831
)
self.settings_page.a11y_audit.check_for_accessibility_errors()