Skip to content

Commit

Permalink
correct default expectation for existing mrow test (#22226)
Browse files Browse the repository at this point in the history
* Update tabindex-001.html

Attempting to match defaults defined in whatwg/html#5248
definitely needs scrutiny..

* Update tabindex-001.html

The default `.tabIndex` of an mrow should be 0 regardless of when it has an href or not, as a linkable element and matching historical (oddity) of other linkable things in HTML/SVG
  • Loading branch information
bkardell authored Mar 13, 2020
1 parent 687b92d commit 6b2fee7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mathml/relations/html5-tree/tabindex-001.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
window.addEventListener("load", function() {
test(() => {
const mrow = document.getElementById('mrow');
assert_equals(mrow.tabIndex, -1, "no attribute");
assert_equals(mrow.tabIndex, 0, "no attribute");
mrow.setAttribute("tabindex", "invalid");
assert_equals(mrow.getAttribute("tabindex"), "invalid");
assert_equals(mrow.tabIndex, -1, "invalid");
assert_equals(mrow.tabIndex, 0, "invalid");
mrow.setAttribute("tabindex", "9999999999");
assert_equals(mrow.getAttribute("tabindex"), "9999999999");
assert_equals(mrow.tabIndex, -1, "too large integer");
assert_equals(mrow.tabIndex, 0, "too large integer");
}, "default and invalid values on mrow");
test(() => {
const mrowLink = document.getElementById('mrow-link');
Expand Down

0 comments on commit 6b2fee7

Please sign in to comment.