Skip to content

Commit e3d68d5

Browse files
authored
fix(curriculum): changed theme switcher value (freeCodeCamp#62202)
1 parent a6596b8 commit e3d68d5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

curriculum/challenges/english/blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In this lab, you will build an app that switches between different themes. When
2525
- A `role` attribute set to `"menu"`.
2626
- An `aria-labelledby` attribute set to `"theme-switcher-button"`.
2727
- A `hidden` attribute.
28-
4. Your `ul` element should have at least two `li` elements with a `role` attribute set to `"menu-item"` and text of your choice representing a different theme.
28+
4. Your `ul` element should have at least two `li` elements with a `role` attribute set to `"menuitem"` and text of your choice representing a different theme.
2929
5. Each of your `li` elements should have an `id` attribute that starts with `theme-` and ends with the theme you set for the `li` element text. For example, if one of your themes is `Light` then your `id` should be `theme-light`.
3030
6. You should have an element with an `aria-live` attribute set to `"polite"`.
3131
7. You should have a `themes` array with at least two objects that each contain a `name` and `message` property. The `name` will represent a different theme and the `message` will display when the theme switches. You are free to come up with `name` and `message` values of your choice but the `name` values should match one of the options you set in your `li` items.
@@ -131,13 +131,13 @@ const listItems = document.querySelectorAll("ul li");
131131
assert.isAtLeast(listItems?.length, 2);
132132
```
133133
134-
Each of your `li` elements should have a `role` attribute set to `"menu-item"`.
134+
Each of your `li` elements should have a `role` attribute set to `"menuitem"`.
135135
136136
```js
137137
const listItems = document.querySelectorAll("ul li");
138138
assert.isNotEmpty(listItems);
139139
listItems.forEach(li => {
140-
assert.equal(li?.getAttribute("role"), "menu-item");
140+
assert.equal(li?.getAttribute("role"), "menuitem");
141141
})
142142
```
143143
@@ -373,10 +373,10 @@ li {
373373
aria-labelledby="theme-switcher-button"
374374
hidden
375375
>
376-
<li class="dropdown-item" id="theme-light" role="menu-item">Light</li>
377-
<li class="dropdown-item" id="theme-dark" role="menu-item">Dark</li>
378-
<li class="dropdown-item" id="theme-ocean" role="menu-item">Ocean</li>
379-
<li class="dropdown-item" id="theme-nord" role="menu-item">Nord</li>
376+
<li class="dropdown-item" id="theme-light" role="menuitem">Light</li>
377+
<li class="dropdown-item" id="theme-dark" role="menuitem">Dark</li>
378+
<li class="dropdown-item" id="theme-ocean" role="menuitem">Ocean</li>
379+
<li class="dropdown-item" id="theme-nord" role="menuitem">Nord</li>
380380
</ul>
381381

382382
<div id="status" aria-live="polite"></div>

0 commit comments

Comments
 (0)