mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-10 01:01:16 -04:00
chore: upgrade tests for accessibility quiz workshop (#59852)
This commit is contained in:
@@ -71,14 +71,18 @@ You should give the second `label` the text `True`.
|
||||
|
||||
```js
|
||||
const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim();
|
||||
assert(l(0) === 'False' ? l(1) === 'True' : true);
|
||||
if (l(0) === 'False') {
|
||||
assert.equal(l(1), 'True');
|
||||
}
|
||||
```
|
||||
|
||||
You should give the second `label` the text `False`.
|
||||
|
||||
```js
|
||||
const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim();
|
||||
assert(l(0) === 'True' ? l(1) === 'False' : true);
|
||||
if (l(0) === 'True') {
|
||||
assert.equal(l(1), 'False');
|
||||
}
|
||||
```
|
||||
|
||||
You should give the third `label` the text `True` or `False`.
|
||||
@@ -91,14 +95,18 @@ You should give the fourth `label` the text `True`.
|
||||
|
||||
```js
|
||||
const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim();
|
||||
assert(l(2) === 'False' ? l(3) === 'True' : true);
|
||||
if (l(2) === 'False') {
|
||||
assert.equal(l(3), 'True');
|
||||
}
|
||||
```
|
||||
|
||||
You should give the fourth `label` the text `False`.
|
||||
|
||||
```js
|
||||
const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim();
|
||||
assert(l(2) === 'True' ? l(3) === 'False' : true);
|
||||
if (l(2) === 'True') {
|
||||
assert.equal(l(3), 'False');
|
||||
}
|
||||
```
|
||||
|
||||
You should give the first `input` a `value` matching the `label` text content.
|
||||
|
||||
@@ -36,7 +36,7 @@ Your `link` element should have `rel="stylesheet"` and `href="styles.css"`.
|
||||
const link = document.querySelector("head>link");
|
||||
assert.equal(link?.getAttribute("rel"), "stylesheet");
|
||||
const href = link?.getAttribute("data-href");
|
||||
assert(href === "./styles.css" || href === "styles.css");
|
||||
assert.oneOf(href, ["./styles.css", "styles.css"]);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user