fix(curriculum): fix wording for music player project step - 66 (#54137)

Co-authored-by: Joy Shaheb <khondokoralam@gmail.com>
This commit is contained in:
Tomas
2024-03-21 22:09:47 +07:00
committed by GitHub
co-authored by Joy Shaheb
parent 398b9eff41
commit e82c401dd2
2 changed files with 5 additions and 3 deletions
@@ -7,9 +7,9 @@ dashedName: step-66
# --description--
Use `const` and arrow syntax to define a function called `setPlayButtonAccessibleText`.
To make the application more accessible, it is important that the play button describes the current song or the first song in the playlist.
This function will set the `aria-label` attribute to the current song, or to the first song in the playlist. And if the playlist is empty, it sets the `aria-label` to `"Play"`.
Start by creating an empty arrow function called `setPlayButtonAccessibleText`.
# --hints--
@@ -7,7 +7,9 @@ dashedName: step-68
# --description--
Use the `setAttribute` method on the `playButton` element to set an attribute named `"aria-label"`. For the value, use a `ternary` to set `song?.title` to `Play ${song.title}` or `"Play"` if there's no `song.title` available.
The `setPlayButtonAccessibleText` function will set the `aria-label` attribute to the current song, or to the first song in the playlist. And if the playlist is empty, it sets the `aria-label` to `"Play"`.
Use the `setAttribute` method on the `playButton` element to set an attribute named `"aria-label"`. For the value, use a ternary to `set song?.title` to `Play ${song.title}` or `"Play"` if there's no `song.title` available.
Don't forget you need template interpolation here, so you need to use backticks.