Summary:
Create our own screenshotting script which takes screenshots. This
improves over huxley for a couple reasons:
- It makes the screenshots the correct size (for some reason, huxley struggles
with this).
- Its configuration matches more with what we want (we don't need multiple
screenshots or interaction, we just want a single static shot)
- It runs faster
I also changed the docs to reflect this change.
Test Plan:
- Make sure all of the tests that were in the Huxleyfile are now in ss_data.json
- Run the screenshotter docker
- Make sure all of the images look reasonable and don't change (except
sometimes the Lap test, which has some strange pixel-positioning
differences...)
Reviewers: kevinb
Reviewed By: kevinb
Differential Revision: https://phabricator.khanacademy.org/D16731
Summary: Make the CSS rules that hide the MathML rendering not
`!important`, so that they can be overridden. Also, remove the useless
`math.katex` rule.
Fixes#197
Test plan:
- `make test`
- See that huxley screenshots haven't changed
Auditors: alpert
Summary:
This adds support for rendering KaTeX to both HTML and MathML
with the intent of improving accessibility. To accomplish this, both
MathML and HTML are rendered, but with the MathML visually hidden and
the HTML spans aria-hidden. Hopefully, this should produce much better
accessibility for KaTeX.
Should fix/improve #38Closes#189
Test Plan:
- Ensure all the tests, and the new tests, still pass.
- Ensure that for each of the group types in `buildHTML.js`, there is a
corresponding one in `buildMathML.js`.
- Ensure that the huxley screenshots didn't change (except for
BinomTest, which changed because I fixed a bug in `buildHTML` where
`genfrac` didn't have a `groupToType` mapping).
- Run ChromeVox on the test page, render some math. (for example,
`\sqrt{x^2}`)
- Ensure that a mathy-sounding expression is read. (I hear "group
square root of x squared math").
- Ensure that nothing else is read (like no "x" or "2").
- Ensure that MathML markup is generated correctly and is interpreted
by the browser correctly by running
`document.getElementById("math").innerHTML =
katex.renderToString("\\sqrt{x^2}");` and seeing that the same speech
is read.
Reviewers: john, alpert
Reviewed By: john, alpert
Subscribers: alpert, john
Differential Revision: https://phabricator.khanacademy.org/D16373