My company is using some rather bizarre download buttons associated with documents that can be downloaded:
It looks like these are abused anchor (
<a>) elements which show up in a browser as
Right click is disabled for this asset! You can still download via direct/left click.
I find this abhorrent (as compared to plain old hyperlinks) but I can't put my finger on why, and I would like to pass along some reputable article that talks about pros/cons of plain hyperlinks vs. "magical" action-on-click.
Could someone help me find a reputable source for when/why to use plain links or "magic" buttons? The best I could find is https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a which says
Use a <button> instead. In general, you should only use a hyperlink for navigation to a real URL.
So MDN suggests a
<button>... but if someone is downloading a document, why/when should that be the case instead of a plain hyperlink?
Again, the advice is use a button or other element... but why use a button? what is the advantage of doing so?
other references I've found: