Alt or title attribute for i tag

前端 未结 5 853
清酒与你
清酒与你 2021-01-30 19:18

I use font-awesome and display their fonts like that:


This will display a nice little lock symbol. For

5条回答
  •  天命终不由人
    2021-01-30 20:07

    You can use the title attribute on an i element, like any element, e.g.

    
    

    Whether it helps is a more difficult issue. Browsers usually show the title attribute value as a “tooltip” on mouseover, but why would the user mouse over the icon? And such tooltips are of poor usability; so-called CSS tooltips often work better.

    Screen readers may give the user optional access to title attributes, but I’m not sure what they do with elements with empty content.

提交回复
热议问题