-
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
[accname] Require specification of subtest count #42769
Changes from all commits
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 |
---|---|---|
|
@@ -31,7 +31,7 @@ <h2 id="h">div group label</h2> | |
--> | ||
|
||
<script> | ||
AriaUtils.verifyLabelsBySelector(".ex"); | ||
AriaUtils.verifyLabelsBySelector(1, ".ex"); | ||
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. See below... Keep 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. #42522 was since merged so it's no longer necessary to leave this change out of the PR, but it should get the mentioned argument order change, and will need an update to the |
||
</script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ <h2 class="ex" data-expectedlabel="heading label" data-testname="heading with te | |
<!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_text_node --> | ||
|
||
<script> | ||
AriaUtils.verifyLabelsBySelector(".ex"); | ||
AriaUtils.verifyLabelsBySelector(1, ".ex"); | ||
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. See below... Keep 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. #42407 was since merged so it's no longer necessary to leave this change out of the PR, but it should get the mentioned argument order change, and will need an update to the |
||
</script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,13 +124,13 @@ const AriaUtils = { | |
data-expectedlabel="foo" | ||
class="ex"> | ||
|
||
AriaUtils.verifyLabelsBySelector(".ex") | ||
AriaUtils.verifyLabelsBySelector(1, ".ex") | ||
|
||
*/ | ||
verifyLabelsBySelector: function(selector) { | ||
verifyLabelsBySelector: function(expectedCount, selector) { | ||
const els = document.querySelectorAll(selector); | ||
if (!els.length) { | ||
throw `Selector passed in verifyLabelsBySelector("${selector}") should match at least one element.`; | ||
if (els.length !== expectedCount) { | ||
throw `verifyLabelsBySelector expected ${expectedCount} elements but received ${els.length}`; | ||
Comment on lines
+130
to
+133
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. Thanks for filing this! I agree it's a good move to be more explicit about the expectations. However, this is going to break a few outstanding PRs that expect
|
||
} | ||
for (const el of els) { | ||
let label = el.getAttribute("data-expectedlabel"); | ||
|
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.
See below... Keep
comp_label.html
as-is (but with a warning) to make way for #41463There 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.
@jugglinmike #41463 was also merged since the the time this was filed.