Example file Using aria-label

The below is the static form with html code snippet that is used for this example. The reason for providing the code snippet is that one can access the source code easily even if it is viewed in the mobile platforms. In general, it might not be very easy to access the source code of the form when this is viewed in the mobile platforms. This example makes you understand how the labels are associated with the ‘aria-label’ technique when you run the screen reader on this form across all the platforms.


First name:

Last name:

Age:

Select Gender

Male
Female

Comments:

I agree terms and conditions

Source Code

</p> <h1> Using Aria-Label </h1> <p><span> First name: </span><br /> <input type="text" aria-label="firstname"/><br /> <span> Last name: </span><br /> <input type="text" aria-label="lastname"/><br /> <span> Age: </span><br /> <select aria-label="age"><option value="10">10</option><option value="20">20</option><option value="30">30</option><option value="40">40</option></select></p> <fieldset> <legend> Select Gender </legend> <p><input type="radio" name="sex" aria-label="male" checked> <span> Male </span><br /> <input type="radio" name="sex" aria-label="female" > <span> Female </span><br /> </fieldset> <p><span> Comments: </span><br /> <textarea rows="5" cols="50" aria-label="comments"></textarea><br /> <input type="checkbox" name="terms"aria-label=" I agree terms and conditions "> <span> I agree terms and conditions </span><br /> <input type="submit"> <input type="button" aria-label="reset"><br />

Leave a Reply

Your email address will not be published. Required fields are marked *