Jump to content
Sign in to follow this  
Havenht

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...