How can I make my HTML markup more semantic when using a QR code?
The following code doesn't look all that semantic. The only thing conveyed is that it is an image.
<img src="/generate_qr_code?value=https://example.com/" />
Is there any way I can improve the semantics?
Maybe wrap it in an anchor? (if the QR code is a URL)
<a href="https://example.com/"><img src="/generate_qr_code?value=https://example.com/" /></a>
Should I have any alt or title attribute on the img element? What should be in those attributes?
<img src="/generate_qr_code?value=https://example.com/" title="QR code" alt="https://example.com/" />
Would that be correct and proper usage of the alt and title attributes?
Is there any ARIA attributes or role attribute that I can use in this context?