accessibility - Separate tabIndex order for Accessiblity using ARIA in HTML5 -


any way provide separate tabindex order accessible elements in html5 using wai-aria?

usecase: lets take case multiple choice question rendered in html. can have question text, radio buttons labels, , submit button.

here radio buttons , submit button should tabbable. whereas 3 components should accessible screen readers. question text should read before radio button labels read.

as example, please check question in following link http://www.html5tests.com/tests/intro/intro-00.php

how should use aria in such case.

the using wai-aria in html spec provides practical guides using aria. written on spec the first rule of aria use is:

if can use native html element [html5] or attribute semantics , behaviour require built in, instead of re-purposing element , adding aria role, state or property make accessible, so.

in case, <fieldset> html element has requirements built-in use <fieldset> rather using else , re-purposing aria. here example implementation:

<fieldset>     <legend>we hear internet based on html. html exactly?</legend>     <p>         <input type="radio" name="html" id="option1" />         <label for="option1">html protocol used route data across internet, via tcp/ip.</label>     </p>     <p>         <input type="radio" name="html" id="option2" />         <label for="option2">html text-based language used structure , present content on world wide web.</label>     </p>     <p>         <input type="radio" name="html" id="option3" />         <label for="option3">html binary file format codes web pages use on internet.</label>     </p>     <p>         <input type="radio" name="html" id="option4" />         <label for="option4">html disk file system used in modern operating systems.</label>     </p> </fieldset>  <input type="submit" value="submit answer" /> 

keep in mind doesn't mean have choose between native html element , aria. pick semantic element first , if still have additional requirements complement element aria.

you can find more information fieldset technique on article: h71: providing description groups of form controls using fieldset , legend elements.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -