Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What values can the HTML5 aria-label attribute have?

Tags:

html

Can someone give me some examples of what type of values are valid for the aria-label attribute.

like image 396
HELP Avatar asked Nov 15 '10 10:11

HELP


People also ask

What elements can have aria-label?

1) What elements can be used with aria-labelinteractive elements: such as a (when href attribute is present), audio and video (when controls attribute is present), input , select , button , textarea . implicit landmark elements: such as header , footer , nav , main , aside , section , and form .

What is aria attribute in html5?

Accessible Rich Internet Applications ( ARIA ) is a set of roles and attributes that define ways to make web content and web applications (especially those developed with JavaScript) more accessible to people with disabilities.

What is the aria-label attribute used for?

The aria-label helps define a string and provides additional information about the structure of the document for users using assistive technology.

How many attributes does aria have?

While there are 35 aria properties and states the W3C defines and which you can read more about on the W3C site, here are the ones we believe to most commonly used and practical for most web pages/applications. aria-activedescendant: Identifies the currently active descendant of a composite widget.


1 Answers

It can be any string, which is used to name an element. The ARIA spec: aria-label says:

Most host languages provide an attribute that could be used to name the element (e.g. the title attribute in HTML), yet this may present a browser tooltip. In the cases where a visible label or visible tooltip is undesirable, authors MAY set the accessible name of the element using aria-label.

So it's like the HTML title attribute.

like image 111
Alohci Avatar answered Sep 29 '22 16:09

Alohci