Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 4 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html-aam/accname-computation-by-element/tr-td-th.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Accname computation tests for <tr></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/wai-aria/scripts/aria-utils.js"></script>
<script src="/html-aam/scripts/html-aam-accname-utils.js"></script>
</head>
<body>
<script>
const testConfig = {
elements: {
'tr': { ancestors: ['table', 'tbody'], descendants: ['td', 'textNode']},
'th': { ancestors: ['table', 'thead', 'tr'], descendants: ['textNode'] },
'td': { ancestors: ['table', 'tbody', 'tr'], descendants: ['textNode'] },
/*
PR #44965 TODO:
How about thead, tbody, and tfoot, which support name from author?
*/
'thead': { ancestors: ['table'], descendants: ['tr', 'th', 'textNode'] },
'tbody': { ancestors: ['table'], descendants: ['tr', 'td', 'textNode'] },
'tfoot': { ancestors: ['table'], descendants: ['tr', 'td', 'textNode'] },
},
nameSources: [
'from 2 aria-labelledby refs',
'from 1 aria-labelledby ref',
'from aria-label',
'from title',
'to be empty'
]
}
HtmlAamAccnameUtils.buildNameComputationTests(testConfig);
AriaUtils.verifyLabelsBySelector(".ex-label");
</script>
</body>
</html>