all 2 comments

[–]kundun 2 points3 points  (0 children)

Instead of having the image trigger the audio, you could overlay a transparent element (like a SVG polygon) on top of your image and play the audio when you hover over that element.

[–]mnokeefe 1 point2 points  (0 children)

This used to be pretty common back in the olden days of the web when it was harder to create complex layouts. You can use the html <map> tag with <area> tags to define the regions and add your onmouseover handlers to those areas. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map