Aria-label and Aria-labelledby application//////////[information Barrier-free Product Alliance]

Source: Internet
Author: User

Aria-label and Aria-labelledby applications

http://accessibilityunion.org/archives/808

posted on December 12, 2013 by Sisiyuan

Aria-label Property

Normally, the input component is assigned a label in the form, and when the user tabs to the input box, the read-screen software reads the text in the corresponding label.

Example: <label for= "username" > User name: </label><input type= "text" id= "username"/>

The Aria-label property specifies the built-in text label for the component when there is no position to design the corresponding label text for the input box. It is not visually presented.

such as: <input type= "text" aria-label= "username"/>

At this point, when the focus falls on the input box, the read-screen software reads out the contents of the Aria-label, the "user name".

After testing, Aria-label only add to the tab to the element, read the screen will read the content.

You can also read the following: <span tabindex= "0″aria-label=" label prompt content > tab-selectable span tags </span>

Aria-labelledby Property

When you want the label text to already exist in another element, you can set its value to the ID of the element.

<div role= "form" aria-labelledby= "Form-title">

<span id="Form-title"> Register with mobile phone number </span>

<form>......</form>

</div>

The form area adds the landmark identity role= "form", and the use of the letter "D" key in contention jumps between lankmark identities.

When you jump to this area, you will not only read the "form area", but also read "register using mobile phone number".

If an element has both Aria-labelledby and Aria-label, the read-screen software will first read the contents of the Aria-labelledby.

Test software: Contention Screen browser: IE9

Related articles:
    • How much does voiceover know?
    • Talk about the standard of the information barrier-free test engineer
    • Website Content Accessibility Guide 2.0/web Content Accessibility Guidelines (WCAG) 2.0 Chinese
    • Official recommendation standard for access to rich Internet applications (Wai-aria 1.0)
    • Skip navigation link

Aria-label and Aria-labelledby application//////////[information Barrier-free Product Alliance]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.