From e82c401dd2864c95adf49b50fe476848d58cee50 Mon Sep 17 00:00:00 2001 From: Tomas <63101847+Re1nGer@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:09:47 +0200 Subject: [PATCH] fix(curriculum): fix wording for music player project step - 66 (#54137) Co-authored-by: Joy Shaheb --- .../6555d8faed60b9d3e4a6cefb.md | 4 ++-- .../6555de565387a2efe90a6ccc.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d8faed60b9d3e4a6cefb.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d8faed60b9d3e4a6cefb.md index 8efc570e2f6..e07e27ac0cd 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d8faed60b9d3e4a6cefb.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d8faed60b9d3e4a6cefb.md @@ -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-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555de565387a2efe90a6ccc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555de565387a2efe90a6ccc.md index ebf68040b8a..5568a84c32d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555de565387a2efe90a6ccc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555de565387a2efe90a6ccc.md @@ -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.