hi, totally blind. using jaws for windows 2025, windows 11 pro 2025, and using google chrome. now doing the build a drum machine lab. and now it is not passing steps 7 to 9. so pasting my minimal code below. so if any one can help. me out. also reproting some issues on the fcc online system. wondering if you rely on amazon web services, wondering if you are suffering any issues, when amazon had a large outage this monday in the states, which was early tuesday in australia. when i then try the sample example in the preview the letter x and z i hear no sounds. so wondering, if an issue. so will paste my js code and the errors below. and also the link to the project.
thank you.
marvin.
ps: pasting now.
java script:
// ----- Step 1-9 Minimal JS ----- //
const pads = document.querySelectorAll(“.drum-pad”);
const audioElements = document.querySelectorAll(“audio”);
pads.forEach(pad => {
pad.addEventListener(“click”, () => {
const soundId = pad.dataset.sound; // e.g., “Kick”, “Snare”
const audio = document.getElementById(soundId);
if (audio) {
audio.currentTime = 0; // reset to start
audio.play();
} else {
console.log(`Audio element not found: ${soundId}`);
}
});
});
document.addEventListener(“keydown”, (e) => {
const key = e.key.toUpperCase(); // x, z, etc.
const pad = document.querySelector(`.drum-pad[data-key="${key}"]`);
if (pad) {
const audio = document.getElementById(pad.dataset.sound);
if (audio) {
audio.currentTime = 0;
audio.play();
} else {
console.log(`Audio element not found for key: ${key}`);
}
}
});
errors:
-
Passed:1. You should have a
divelement with anidofdrum-machinethat contains all other elements. -
Passed:2. Inside the
#drum-machineelement you should have anotherdivwith anidofpad-bank. -
Passed:3. Inside the
#drum-machineelement you should have apelement with anidofdisplay. -
Passed:4. Inside your
#pad-bankelement you should have nine clickable drum pad elements each with a class ofdrum-pad. -
Passed:5. Each
.drum-padshould have one of the following letters asinnerText, in order:Q,W,E,A,S,D,Z,X,C. -
Passed:6. Each
.drum-padshould have anaudioelement which has a class ofclip, asrcattribute that points to an audio clip, and anidcorresponding to the inner text of its parent.drum-padelement (e.g.id="Q",id="W",id="E"etc.). -
Failed:7. When you click on a
.drum-padelement, the audio clip contained in its child audio element should be triggered. -
Failed:8. When you press one of the keys Q, W, E, A, S, D, Z, X, C on your keyboard, the corresponding
audioelement should play the corresponding sound. -
Failed:9. When a
.drum-padis triggered, you should display a string describing the associated audio clip as the inner text of the#displayelement (each string must be unique). -
link to the project:
-
https://www.freecodecamp.org/learn/full-stack-developer/lab-drum-machine/build-drum-machine
-
.