joined:Apr 1, 2016
I have a page where I have two version of the same image to display on the page. Below the image I have two buttons, "show v1" and "show v2". The v1 images appears by default when the page loads, and when the "show v2" button is clicked by the user the "v2" image is displayed in place of the "v1" image. The buttons are not <button> tags but <a> tags styled as buttons and there is a JS script that use e.preventDefault() to prevent the page for going to the link address. As such the value of the href attribute is moot, typically I would make it "#", but in this case I'm wondering if there is a benefit from an SEO perspective to include the URL.
I realize that users surfing with JS disabled (typically bots and a few people here), when clicking the link, will be directed to the image specifically. This is not the intention from a usability perspective, as I would prefer that user sees the image within the context of the page.