-
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
Add tests for accnames from hidden labels, captions, and legends #44965
Open
adampage
wants to merge
15
commits into
web-platform-tests:master
Choose a base branch
from
adampage:html-aam-hidden-names
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d395bbb
add tests for names from hidden elements
adampage 48626ed
normalize class names
adampage ae4b00d
Merge remote-tracking branch 'upstream/master' into html-aam-hidden-n…
adampage 753c42b
remove tentative test status
adampage bdc8508
add accname tests by element
adampage b70094e
remove iframe src in case it’s causing CI Firefox crash
adampage 2adf4f3
Merge remote-tracking branch 'upstream/master' into html-aam-hidden-n…
adampage 5c8a5e7
replaces all static subtest markup with dynamic generation
adampage 84f1c0d
Merge remote-tracking branch 'upstream/master' into html-aam-hidden-n…
adampage 9260cfb
replace sample image
adampage 8054453
flesh out interior table content
adampage 0532504
rename children/parents to descendants/ancestors
adampage 428b8a9
render an unnamed image for invisible empty subtests
adampage ea6ca4c
make tr/td/th test tentative
adampage a520a8a
add subtests for hidden+visible caption/legend
adampage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <a></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> | ||
let testConfig = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#a-element-accessible-name-computation', | ||
elements: { | ||
'a': { attrs: ['href'] } | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from subtree', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <area></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#area-element-accessible-name-computation', | ||
elements: { | ||
'area': { attrs: ['href'], specialContext: 'area' } | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from alt', | ||
'from empty alt', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <button></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#button-element-accessible-name-computation', | ||
elements: { | ||
'button': {} | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from 2 labels', | ||
'from 1 label', | ||
'from subtree', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <fieldset></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#fieldset-element-accessible-name-computation', | ||
elements: { | ||
'fieldset': {} | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from first legend', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <figure></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#figure-element-accessible-name-computation', | ||
elements: { | ||
'figure': {} | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from first figcaption', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <iframe></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#iframe-element-accessible-name-computation', | ||
elements: { | ||
'iframe': {} | ||
}, | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Accname computation tests for <img></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 = { | ||
urlSpec: 'https://www.w3.org/TR/html-aam-1.0/#img-element-accessible-name-computation', | ||
elements: { | ||
'img': { attrs: ['img src'] } | ||
}, | ||
nameSources: [ | ||
'from 2 aria-labelledby refs', | ||
'from 1 aria-labelledby ref', | ||
'from aria-label', | ||
'from alt', | ||
'from empty alt', | ||
'from title', | ||
'to be empty' | ||
] | ||
} | ||
HtmlAamAccnameUtils.buildNameComputationTests(testConfig); | ||
AriaUtils.verifyLabelsBySelector(".ex-label"); | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
New tests to a file tracked in the current Interop project would only be accepted if they didn't introduce new failures mid-year. In this case, the 3 new tests are all passing in Chromium, Gecko, and WebKit.... (Edge unknown but likely passing?) so I think it's okay to include this in the PR... With the caveat that we could roll it back in the unlikely chance it causes a failure for Edge.
In the future, it may be easier to include Interop-tracked changes as a separate PR from ones that do not affect the current Interop project.
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.
Ah, understood, thanks. I’ll make that distinction for future PRs and check in with you if I have doubts.
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.
In cases where you need to add a new valid-but-failing tests, add a new file that uses the same file name +".tentative" and have it only include the new failing tests... e.g.
comp_hidden_not_referenced.tentative.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.
Got it. 👍🏻 I did just manually confirm that latest Edge is passing all 3 new tests, so... no harm no foul? But I’ll stay ready to roll it back regardless.