-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mathjax a11y update #19509
mathjax a11y update #19509
Conversation
@@ -727,10 +727,11 @@ def get_new_post_preview_value(self, selector=".wmd-preview > *"): | |||
self.wait_for_element_visibility(selector, "WMD preview pane has contents", timeout=10) | |||
return self.q(css=".wmd-preview").html[0] | |||
|
|||
def get_new_post_preview_text(self): | |||
def get_new_post_preview_text(self, selector=".wmd-preview > div"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for moving this to an argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, the 'div' is rendered when we use block mathjax ($$ $$). For inline, the 'p' tag is rendered inside the wmd-preview. By allowing a default value, we can easily add a test case for inline mathjax, by providing a selector from the test case, if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, are you providing this selector
from any test at the moment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at the moment, but I was considering adding a new test case for the Editor, just to confirm flaky behavior is no longer there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
problem_page.verify_mathjax_rendered_in_preview() | ||
problem_page.click_submit() | ||
self.assertFalse(problem_page.simpleprob_is_correct()) | ||
problem_page.click_reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if self.assertTrue(problem_page.is_reset_button_present())
before clicking the reset button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
problem_page.fill_answer_numerical('R_1/R_3') | ||
problem_page.click_submit() | ||
self.assertFalse(problem_page.simpleprob_is_correct()) | ||
problem_page.click_reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need an empty line at the end of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is empty line. otherwise PEP8 test would have failed. Checked it locally as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got you!
@@ -933,3 +933,71 @@ def test_grader_type_displayed(self): | |||
problem_page = ProblemPage(self.browser) | |||
self.assertEqual(problem_page.problem_name, 'TEST PROBLEM') | |||
self.assertEqual(problem_page.problem_progress_graded_value, "1 point possible (ungraded)") | |||
|
|||
|
|||
class FormulaProblemTest(ProblemsTest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests look clean. Good job.
jenkins run all |
19dea5a
to
2f2a0af
Compare
jenkins run all |
jenkins run bokchoy |
2c3c5eb
to
5b6776e
Compare
jenkins run all |
1 similar comment
jenkins run all |
jenkins run bokchoy |
4a1e7c8
to
012ae3e
Compare
jenkins run all |
22c3f42
to
db76858
Compare
jenkins run bokchoy |
db76858
to
474b05f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We sat together and discussed that The PR looks good to me and there are few nits which could be addressed.
}; | ||
|
||
DiscussionUtil.typesetMathJax = function(element) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this extra line.
8653cd3
to
1feafd6
Compare
jenkins run bokchoy |
awesome work 👍 |
1feafd6
to
8b24be4
Compare
8b24be4
to
bd262e0
Compare
Your PR has finished running tests. There were no failures. |
🎊 thank you for your continued efforts on this one @DawoudSheraz! |
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Friday, January 18, 2019. |
EdX Release Notice: This PR has been deployed to the production environment. |
EDUCATOR-3764
Description
Mathjax provides with the accessibility features to allow access to the rendered content in every possible ways. In current scenario, the files required for the a11y are loaded manually. There is need to enable those files automatically whenever the Mathjax is loaded. This PR addresses the configuration to load the a11y files for the Mathjax by upgrading it to 2.7.5 and adding the required configuration.
Change Impact
Problem Identification
Problem Resolution
Other Notes
Testing
Following Mathjax expressions' speech output has been verified:
Sandbox
Reviewers
Post Review