-
Notifications
You must be signed in to change notification settings - Fork 0
/
silence_tests.js
33 lines (28 loc) · 888 Bytes
/
silence_tests.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// These are the different permutations of ARIA attributes to try.
var attrs = [
'role="alert"'];
var live_region_counter = 0;
build();
addTests(
'alert',
'just changing the css position should not announce anything',
'<div ARIA-ATTRS>This is an alert.</div>',
function(region) {
region.style.position = 'absolute';
});
addTests(
'alert',
'changing the css position after deleting the alert text should not announce anything either',
'<div ARIA-ATTRS>This is an alert.</div>',
function(region) {
region.textContent = '';
region.style.position = 'absolute';
});
addTests(
'alert',
'change unrelated attribute in a live region, should not speak',
'<div id="foo15" ARIA-ATTRS>Live region failure' +
'</div>',
function(region) {
document.getElementById('foo15').className = 'cats-are-liquid';
});