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:
- Inverse functions and composition of functions
- Difference between regular functions and arrow functions
- Fruitful Functions and Void Functions in Julia
- How to set attribute without value using jQuery ?
- jQuery | Callback Functions
- How to call functions after previous function is completed in jQuery ?
- jQuery | [attribute!=value] Selector
- jQuery | [attribute*=value] Selector
- jQuery | [attribute$=value] Selector
- jQuery | [attribute|=value] Selector
- jQuery | [attribute=value] Selector
- jQuery | [attribute^=value] Selector
- jQuery | [attribute~=value] Selector
- jQuery | [attribute] Selector
- JQuery | Remove “disabled” attribute from an element
- How to use input readonly attribute in jQuery ?
- How to select elements by attribute in jQuery ?
- How to remove CSS “top” and “left” attribute with jQuery ?
- jQuery | jQuery.fx.interval Property with example
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.