I’ve found the solution via looking at the forums, but I had originally had the following as my code for my ternary operator. Could someone explain to me why the equal sign use here is not correct?
const setPlayButtonAccessibleText = () => {
const song = userData?.currentSong || userData?.songs[0];
playButton.setAttribute("aria-label" = song?.title ? `Play ${song.title}` : "Play")
};