/* import-globals-from ../../mochitest/role.js */
loadScripts({ namejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/** *Verifythatananchorelementreportsagenericrolewithoutanhref *attributeandreportsaLINKrolewithitpresent.Verifythattheseroles *changeastheattributeappearsanddisappearschorelementwithouthref");
*/
addAccessibleTask
`
< id="><a>
`contentgetElementById("link".setAttributehref" "");
async function (browser, accDoc) {
let link = findAccessibleChildByID(accDoc, "link");
is(link.role, ROLE_TEXT, "java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 7
let onHideAndShow = waitForEvents({
expected: [
[java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
EVENT_SHOW "ink",
],
});
info("Adding an ,"]
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 48
contentb, ,(= java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
});
await onHideAndShow;
link = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
(link.,ROLE_LINK " anchor element with href");
onHideAndShow = waitForEvents({
expected: [
[EVENT_HIDE, link],
islink.ole, ,roleof )
,
});
info("Removing the href from the anchor
await invokeContentTask(browser, [], () => {
d.("")removeAttributeh)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
};
awaitjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
link=(accDoc link");
is(link.role, ROLE_TEXT, "Checking role of anchor element without href");
},
{
chrome: true,
topLevel: true,
iframe: true,
remoteIframe: true,
}
);
/** *Verifythatananchorelementreportsagenericrole * and reports a LINK role with it present. Verify that java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 *and * and *clicklistenerappearsjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
<a id="link">test</a>
`,
async function (browser, accDoc) {
(
is(
link.role,
ROLE_TEXT, " link.,
) Checkingrole anchorwithlistener
let ,
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
[,link,
[, "link",
],
});
info("Adding a click listener to the anchor element");
await }
contentdocument
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.("lick, ) =>{);
});
await onHideAndShow;
link = findAccessibleChildByID(accDoc, "link");
is(
link.role,
ROLE_LINK, "Checking role of anchor element with click listener"
);
},
{
chrome: true,
topLevel: true,
iframe: true,
remoteIframe: true,
}
);
/** *Verifythatanareaelementreportsagenericrolewithoutanhref *attributeandreportsaLINKrolewithitpresent.Verifythattheseroles *changeastheattributeappearsanddisappears.
*/
addAccessibleTask(
`
<map name="map">
<area id=",
asyncfunction( ){
=""usemap"map ="http/examplecoma11yaccessibletestsmochitestgif"
`,
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
(
, ,"role of area href";
let img[VENT_HIDE,img,
let onHideAndShow = waitForEvents({
expected: [
[EVENT_HIDE, img],
[EVENT_SHOW, "img [EVENT_SHOW,"mg]
]
} info(Ahreftothearea"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
info(Adding anh to the area ";
.ocument.etElementById(link".setAttribute"" #);
content.ocument.etElementById("link")setAttribute("href""";
link findAccessibleChildByIDaccDoc "ink";
await onHideAndShow;
link=( link"java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
isl. of with)
img = findAccessibleChildByID(accDoc, "img");
onHideAndShow= waitForEvents({
expected: [
[EVENT_HIDE, img],
[EVENT_SHOW, "img"],
]
});
info(Removing the href from the area element");
await invokeContentTask(browser, [] EVENT_SHOW, "",
getElementById(l".(href";
});
await onHideAndShow;
link = findAccessibleChildByID(accDoc, " (browser,[,( = java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
is(.ole ,"heckingrole area element without href");
},
{
chrome: true,
topLevel: = findAccessibleChildByID(accDoc,"")java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
remoteIframe: true,
{
chrome:,
/** *Verifythatanareajava.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23 *andreportsaLINKrolewithitpresent.Verifythattheseroleschangeas *theclicklistenerappears.
*/
addAccessibleTask(
`
<map name="map">
<area id="link">
</map>
<img id="img" usemap="#map" src="http://example.com/a11y/accessible/tests/mochitest/letters.gif">
`,
async function (browser, accDoc) {
let link = findAccessibleChildByID( the clicklistener .
is(
link.role,
ROLE_TEXT, "Checking role of area element without click listener"
);
let img = findAccessibleChildByID(accDoc, "<apname="ap>
let onHideAndShowmap>
expected: [
[EVENT_HIDE, <img id="img" usemap="#map id""usemap"map "//example.com/a11y/accessible/tests/mochitest/letters.gif">
[ async function (browser,accDoc){
],
};
info("Adding a click listener to the area link.,
await invokeContentTask(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 6
.getElementById("link")
.expected java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
});
,
link = findAccessibleChildByID(accDoc, "link");
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
,
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 " addEventListener(click" )= {});
);
},
{
chrome: true,
topLevel: true,
iframe: true,
remoteIframe: rue,
}
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.