fix(curriculum): use get computed styles in step 46 of the access quiz (#54146)

This commit is contained in:
Anna
2024-03-26 00:58:46 -04:00
committed by GitHub
parent 9b66fbad37
commit 3e03664e38

View File

@@ -16,13 +16,15 @@ Change the font color of all the anchor elements within the list elements to som
You should use the `li > a` selector.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('li > a'));
const anchors = document.querySelectorAll('li > a');
anchors.forEach(a => assert.exists(getComputedStyle(a)));
```
You should give the `a` element a `color` property.
```js
assert.notEmpty(new __helpers.CSSHelp(document).getStyle('li > a')?.color);
const anchors = document.querySelectorAll('li > a');
anchors.forEach(a => assert.notEmpty(getComputedStyle(a)?.color));
```
You should give the `color` property a contrast with the background of at least 7:1. _Hint: I would use `#dfdfe2`_