Lab 36 Reflection

     Lab 36 was about creating a webpage with a voice synthesizer that would read text we typed in a textbox. After setting up the webpage, I created a div containing 3 <input> tags, two set to range and one set to text, and 2 <button> tags that would call functions to either start or stop the speech. I stored these controls in their own variables in the JS and created a function, toggle, that stored what was in the textbox at the moment used speechSynthesis.speak() to speak what was in it. I added an event listener to the speak button that called this function when the button was clicked. Similarly, I created a function for the stop button but this time, it called speechSynthesis.stop(), this function being part of an event listener as well. A function was also made for both sliders that checked the position the slider was in and determined by what value to change pitch or rate based on slider position. This function was part of an event listener for the sliders.
     These skills are important for a web designer because they make a site more accessible for certain demographics, notably the vision impaired. Those who can't see a site can still use one if the site speaks its contents out. Through use of speech synthesis, this is possible and opens up use to another demographic. It means more people can use the website and increases traffic.

Comments

Popular Posts