-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Accessibility] - Test for elements not in viewport contained within content-visibility: auto CSS property #50004
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Name Comp: content visibility (Tentative)</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> | ||
</head> | ||
<body> | ||
|
||
<h1>Testing accessibility of content-visibility: auto</h1> | ||
|
||
<h2>Accname</h2> | ||
|
||
<div style="height:5px; overflow:scroll;"> | ||
<div> | ||
<p>Some content</p> | ||
<p>Some content</p> | ||
<p>Some content</p> | ||
<p>Some content</p> | ||
<p>Some content</p> | ||
</div> | ||
<div style="content-visibility:auto"> | ||
<h2 class="el">test heading</h2> | ||
<button class="el">test button</button> | ||
<a class="el" href="#">test link</a> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
const els = document.querySelectorAll('.el'); | ||
if (!els.length) { | ||
throw `No`; | ||
} | ||
for (const el of els) { | ||
promise_test(async t => { | ||
let computedLabel = await test_driver.get_computed_label(el); | ||
let computedRole = await test_driver.get_computed_role(el); | ||
|
||
console.log('el-text-content: '+el.textContent+'; comp-role-f: '+computedRole+'; comp-label-f: '+computedLabel); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can still use the existing aria utils logging to abstract this... Just leave the expected role and labels as something no engine will ever use, like data-expectedrole="SPEC_AMBIGUOUS_LOG_VALUE" and all engines will log a message like ~"Role for for element was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it acceptable for all engines to fail, even if the outcome is uncertain? |
||
}) | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs
data-expectedrole="heading"
, etc.