blob: a107bac4d1a94fffc02f2e41a163ee5f74e3604e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_FormFieldLabels() {
await PrintHelper.withTestPage(async helper => {
await helper.startPrint();
let fields = Array.from(helper.get("print").elements);
for (let field of fields) {
if (field.localName == "button") {
continue;
}
ok(
field.labels.length ||
field.hasAttribute("aria-label") ||
field.hasAttribute("aria-labelledby"),
`Field ${field.localName}#${field.id} should be labelled`
);
}
});
});
|