-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[main.js] getHTML: add aria-label to correct childnode (#291)
* [main.js] getHTML: add aria-label to correct childnode Resolves #289 * [main.js] GetHTML: make handling of speakText more robust * improve selectors * update tests part of #289 * address review comments * fix whitespace
- Loading branch information
Showing
3 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var tape = require('tape'); | ||
var mjAPI = require("../lib/main.js"); | ||
|
||
tape('HTML output: add aria-label to correct childnode', function(t) { | ||
t.plan(1); | ||
mjAPI.start(); | ||
var mml = '<math alttext="0"><mn>1</mn></math>'; | ||
|
||
mjAPI.typeset({ | ||
math: mml, | ||
format: "MathML", | ||
htmlNode: true, | ||
html: true | ||
}, function(data) { | ||
t.equal(data.htmlNode.parentNode.querySelectorAll('[aria-label]').length, 1, 'Aria-label is unique'); | ||
}); | ||
}); |