What are these attributes: `aria-labelledby` and `aria-hidden`

Hao picture Hao · Sep 21, 2013 · Viewed 140.5k times · Source

Using Bootstrap modal, I've seen these aria attributes a lot, but I never knew how to make use of them.

Does anyone know what cases to use these attributes? I googled—just didn't find any straightforward answers.

Answer

Praveen picture Praveen · Sep 21, 2013

HTML5 ARIA attribute is what you're looking for. It can be used in your code even without bootstrap.

Accessible Rich Internet Applications (ARIA) defines ways to make Web content and Web applications (especially those developed with Ajax and JavaScript) more accessible to people with disabilities.

To be precise for your question, here is what your attributes are called as ARIA attribute states and model

aria-labelledby: Identifies the element (or elements) that labels the current element.

aria-hidden (state): Indicates that the element and all of its descendants are not visible or perceivable to any user as implemented by the author.