0.问题
html的<a>是不支持alt属性的
https://www.w3.org/TR/html5/textlevel-semantics.html#the-a-element
支持如下全局属性
href - Address of the hyperlink
target - Default browsing context for hyperlink navigation and §4.10.21 Form submission
download - Whether to download the resource instead of navigating to it, and its file name if so
rel — Relationship of this document (or subsection/topic) to the destination resource
rev — Reverse link relationship of the destination resource to this document (or subsection/topic)
hreflang - Language of the linked resource
type - Hint for the type of the referenced resource
referrerpolicy - Referrer policy for fetches initiated by the element
Allowed ARIA role attribute values:
link (default - do not set), button, checkbox, radio, switch, tab or treeitem
Allowed ARIA state and property attributes:
Global aria-* attributes
Any aria-* attributes applicable to the allowed roles.
<a alt="text">sometiong</a> <!--无效-->
alt只支持img等几个少量元素
1. 解决办法
使用title属性
<a title="text">sometiong</a> <!--success-->