What is aria-label and how should I use it?

前端 未结 6 2031
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 16:52

A few hours ago I read about the aria-label attribute, which:

Defines a string value that labels the current element.

But in my

6条回答
  •  无人及你
    2020-11-30 17:44

    If you wants to know how aria-label helps you practically .. then follow the steps ... you will get it by your own ..

    Create a html page having below code

    
    
    
        
    
    
        
        



    Now, you need a virtual screen reader emulator which will run on browser to observe the difference. So, chrome browser users can install chromevox extension and mozilla users can go with fangs screen reader addin

    Once done with installation, put headphones in your ears, open the html page and make focus on both button(by pressing tab) one-by-one .. and you can hear .. focusing on first x button .. will tell you only x button .. but in case of second x button .. you will hear back to the page button only..

    i hope you got it well now!!

提交回复
热议问题