Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html-aam/accname-computation-by-element/summary.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Accname computation tests for <summary></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: {
'summary': { ancestors: ['details'] }
},
nameSources: [
'from 2 aria-labelledby refs',
'from 1 aria-labelledby ref',
'from aria-label',
'from subtree',
'from title',
// 'from browser default',
// 'to be empty'
]
}
/*
PR #44965 TODO:
A present-but-empty summary causes web driver to choke?
*/
/*
PR #44965 TODO:
Are browser default names testable?
As of April 2024, default names for <summary> are:
- Chrome: "Details"
- Safari: "Details"
- Firefox: "Details"
*/
/*
PR #44965 TODO:
What could cause the implementation-defined string to be
unavailable, and can that be tested? The remaining accname steps are:
5. If there is a summary element as a direct child of the details element,
but none of the above yield a usable text string, there is no
accessible name.
*/
HtmlAamAccnameUtils.buildNameComputationTests(testConfig);
AriaUtils.verifyLabelsBySelector(".ex-label");
</script>
</body>
</html>