Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<html>
<head>
<title>nsIAccessible actions testing for HTML links that
scroll the page to named anchors</title>
<link rel="stylesheet" type="text/css"
<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../promisified-events.js"></script>
<script type="application/javascript"
src="../actions.js"></script>
<script type="application/javascript">
/* global testAction */
// gA11yEventDumpID = "debug"; // debug stuff
// gA11yEventDumpToConsole = true; // debug stuff
async function doTest() {
await testAction({
id: "anchor1",
actionName: "jump",
actionIndex: 0,
events: CLICK_EVENTS,
eventSeq: [
[EVENT_SCROLLING_START, getAccessible("bottom1")],
],
});
await testAction({
id: "anchor1",
actionName: "jump",
actionIndex: 0,
events: CLICK_EVENTS,
eventSeq: [
[EVENT_SCROLLING_START, getAccessible("bottom1")],
],
});
await testAction({
id: "anchor2",
actionName: "jump",
actionIndex: 0,
events: CLICK_EVENTS,
eventSeq: [
[EVENT_SCROLLING_START, getAccessible("bottom2")],
],
});
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank" rel="opener"
title="Some same page links do not fire EVENT_SYSTEM_SCROLLINGSTART">
</a><br>
<a target="_blank" rel="opener"
title="Clicking the 'Skip to main content' link once works, second time fails to initiate a V cursor jump">
</a><br>
<a target="_blank" rel="opener"
title="Same page links to targets with content fires scrolling start accessible event on leaf text node">
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div id="debug"></div>
<h1>This is a test page for anchors</h1>
This is a top anchor<a name="Top">
</a><a id="anchor1" href="#bottom1">Link to anchor</a>
<a id="anchor2" href="#bottom2">Link to div</a>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br>This is some text in the middle<br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
This is some text.
This is a bottom anchor<a id="bottom1"></a>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<div id="bottom2">This is a div</div>
</body>
</html>