Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <html> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>states of document article</title> |
michael@0 | 4 | |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="../common.js"></script> |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../role.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../states.js"></script> |
michael@0 | 17 | |
michael@0 | 18 | <script type="application/javascript"> |
michael@0 | 19 | function doTest() |
michael@0 | 20 | { |
michael@0 | 21 | var docAcc = getAccessible(document, [nsIAccessibleDocument]); |
michael@0 | 22 | if (docAcc) { |
michael@0 | 23 | testStates(docAcc, STATE_READONLY); |
michael@0 | 24 | testStates("aria_article", STATE_READONLY); |
michael@0 | 25 | testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, |
michael@0 | 26 | STATE_READONLY); |
michael@0 | 27 | testStates("article", STATE_READONLY); |
michael@0 | 28 | testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 29 | |
michael@0 | 30 | document.designMode = "on"; |
michael@0 | 31 | |
michael@0 | 32 | testStates(docAcc, 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 33 | testStates("aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 34 | testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 35 | testStates("article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 36 | testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 37 | |
michael@0 | 38 | document.designMode = "off"; |
michael@0 | 39 | |
michael@0 | 40 | testStates(docAcc, STATE_READONLY); |
michael@0 | 41 | testStates("aria_article", STATE_READONLY); |
michael@0 | 42 | testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 43 | testStates("article", STATE_READONLY); |
michael@0 | 44 | testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); |
michael@0 | 45 | } |
michael@0 | 46 | SimpleTest.finish(); |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 50 | addA11yLoadEvent(doTest); |
michael@0 | 51 | </script> |
michael@0 | 52 | </head> |
michael@0 | 53 | |
michael@0 | 54 | <body role="article"> |
michael@0 | 55 | |
michael@0 | 56 | <a target="_blank" |
michael@0 | 57 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=467387" |
michael@0 | 58 | title="Expose non-editable documents as readonly, regardless of role"> |
michael@0 | 59 | Mozilla Bug 467387 |
michael@0 | 60 | </a><br/> |
michael@0 | 61 | <a target="_blank" |
michael@0 | 62 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502" |
michael@0 | 63 | title="Map <article> like we do aria role article"> |
michael@0 | 64 | Mozilla Bug 613502 |
michael@0 | 65 | </a> |
michael@0 | 66 | <p id="display"></p> |
michael@0 | 67 | <div id="content" style="display: none"></div> |
michael@0 | 68 | <pre id="test"> |
michael@0 | 69 | </pre> |
michael@0 | 70 | |
michael@0 | 71 | <div id="aria_article" role="article">aria article</div> |
michael@0 | 72 | <div id="editable_aria_article" role="article" contentEditable="true"> |
michael@0 | 73 | editable aria article</div> |
michael@0 | 74 | |
michael@0 | 75 | <article id="article">article</article> |
michael@0 | 76 | <article id="editable_article" contentEditable="true"> |
michael@0 | 77 | editable article</article> |
michael@0 | 78 | |
michael@0 | 79 | </body> |
michael@0 | 80 | </html> |