I'm using a custom tooltip library, to view my titles and image alts. The way an image or link is rendered without this script is:
<img src="URL HERE" title="TITLE HERE" height="123" width="321">
As you see the title is there. But after rendering the page while having the script enabled, the above image will be rendered as:
<img src="URL HERE" class="CUSTOM TOOLTIP" height="123" width="321">
The alt is gone (or the title, if it's a link tag), and it's replaced by the custom class. When you hover it, you can see the proper title/alt.
The HTML output is changed in the console, but not in the source output (obviously because jScript is client side).
Now the question is, can search engines still read the alt/title attributes?
I've read that nowadays google renders your page with JavaScript enabled, so i'm not sure if it takes this into account.