Exercise One - Fill in the Blank

The Code

function show_new_object() {

       // create a paragraph to be the alert message
       var myAlert = document.createElement("p");
       myAlert.setAttribute('id','mess2');
       Blank Answer Space
       
       // change the color & make it bold
       myAlert.style.color='#AF3D5C';
       myAlert.style.fontWeight='bold';

       // include some text
       var msg = document.createTextNode("Please provide a valid email address."); 
       myAlert.appendChild(msg);

       // place the alert on the page    
       window.myparent = \
       document.getElementById("place4alert");
       window.myparent.appendChild(myAlert);

}

The Answer Choices

  1. myAlert.setAttribute(‘role’,’application’);
  2. Sorry, this site uses Canvas.
  3. remove aria-live=”polite”,
  4. myAlert.setAttribute(‘role’, ‘alert’);
  5. change aria-live=”polite” to aria-live=”assertive”
  6. document.getElementById("ShowButton").focus();
  7. document.focus();
  8. Hello World!
  9. remove <h3>Timer</h3>
  10. document.getElementById("StayButton").focus();
  11. myAlert.setAttribute(‘role’, ‘slider’);