The ‘aria-hidden’ attribute plays an important role in context of web-accessibility. It is a simple way to make web content/applications more accessible to people with disabilities. This attribute is used to indicate that the element and all of its descendants are not visible or perceivable to any user as per the implementation. Now in your mind may a question arrived that what is the difference between ‘hidden’ and ‘aria-hidden’ attributes?
The main aspect of making this solution is to make content readable only when content is visible on screen otherwise should remain inaccessible. Here, we’ll be using attr() method to do the same which is used for setting/getting an element’s attribute.
Getter: $([selector]).attr('attribute'); Setter: $([selector]).attr('attribute', 'value');
Below example illustrate the above approach:
- jQuery | Callback Functions
- How to call functions after previous function is completed in jQuery ?
- How to set attribute without value using jQuery ?
- jQuery | [attribute$=value] Selector
- jQuery | [attribute!=value] Selector
- jQuery | [attribute=value] Selector
- jQuery | [attribute] Selector
- jQuery | [attribute|=value] Selector
- jQuery | [attribute^=value] Selector
- jQuery | [attribute~=value] Selector
- jQuery | [attribute*=value] Selector
- How to select elements by attribute in jQuery ?
- How to use input readonly attribute in jQuery ?
- How to remove CSS “top” and “left” attribute with jQuery ?
- JQuery | Remove “disabled” attribute from an element
- Difference between regular functions and arrow functions
- Inverse functions and composition of functions
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.support Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.