Jump to content

how to have text-to-speech not read a certain words in html5


Havenht

Recommended Posts

is there a way to have text-to-speech not read a certain words or numbers.

example: " 3. I'm a noob " I dont want tts to read "3." and just read " I'm a noob". I have tried speak:none and aria-hidden="true" , But that appear to only work for screen reader and not tts. I am using google text to speech. and my code is in html5. Thanks

Updates: This question seem to be unclear to some people. I am making an android app book that have the feature text-to-speech. When text-to-speech is enable, It read everything on the page. I want a code that can control what i want it to read on the page and what not to read out loud. for an example : I want it to read out loud the body paragraph texts and not read loud out the chapters text on that page.Is there a code that I can use. thanks

Link to comment
Share on other sites

I don't think there's anything you can do to stop it. While ARIA properties and aural CSS rules can apply to screen readers, what the text-to-speech tool seems to do is extract the text content from the page and read it as it is without actually paying any attention to HTML or CSS.

 

I think that maybe if the number is part of a <li> or added with a ::before pseudo-selector it might not be read by the text-to-speech tool.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...