Roles can be used to build accessible applications by providing any missing information that the assistive technology needs to anticipate the behavior of the elements inside the application.
For example, to support accessibility the browser may create accessible objects of a web page though the Accessibility API of the operating system. When the full semantics are provided and understood by the browser, the application will properly map the page to accessible objects of the operating system.
Step 1: Use your native mark up as well as you can
Step 2: Find the right roles
Set roles to make sure elements behave predictably and correctly describes the behavior of each element within your application (unless elements behaviors are fully described by the native markup language).
Step 3: Look for groups
Look for groups within a page, and mark them using the most appropriate role that best describes their usage.
Step 4: Build relationships
Sometimes the relationships can be made clear via the native mark up language.
Sometimes this can be implied via the DOM.
In other cases, use the States and Properties. For example: aaa:property in region B to reference region A.
Step 5: Set properties
Set properties until the behavior of the element is defined and described (such as aaa:required aaa:live)
Control the behavior of the element using device independent events, states, and properties.
<owl:ObjectProperty rdf:ID=" mustContain "> <rdfs:comment xml:lang="en">A child that must be contained by this role</rdfs:comment> <rdfs:subpropertyOf rdf:resource="#scope"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:ID=" supportedState "> <rdfs:comment xml:lang="en">A state that can be supported for this Role</rdfs:comment> <rdfs:domain rdf:resource="#roletype"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:ID=" requiredState "> <rdfs:comment xml:lang="en">A state that must be provided for this Role</rdfs:comment> <rdfs:subpropertyOf rdf:resource="#supportedState"/> <rdfs:domain rdf:re source="#roletype"/> </owl:ObjectProperty>
Define the anticipated content and scope of the role
Define any related concepts
Set defaults when appropriate
…… Compare to making accessible applications
Using Datatype and Groups Group container labeled “ date chooser” Contains combobox labeled day Datatype =Day Contains combobox labeled month Datatype = Month Contains combobox labeled year Datatype = gyear