Confirmed users
292
edits
(Fixes to grammar and slight clarifications, no changes in actual meaning.) |
|||
| Line 1: | Line 1: | ||
=Summary= | =Summary= | ||
The page is designed to extend section 3.2 "Conflicts between native markup semantics and ARIA" of the [http://www.w3.org/TR/wai-aria-implementation/#mapping_conflicts ARIA implementation guide] to get rid possible multiple treatments of the specification. | The page is designed to extend section 3.2 "Conflicts between native markup semantics and ARIA" of the [http://www.w3.org/TR/wai-aria-implementation/#mapping_conflicts ARIA implementation guide] to get rid of possible multiple treatments of the specification. | ||
=Proposal= | =Proposal= | ||
When the page is mapped to accessibility API then ARIA wins native markup if any conflict | When the page is mapped to accessibility API then ARIA wins over native markup if any conflict occurs, i.e. the rules of native markup mapping are overridden by rules of ARIA markup mapping because ARIA is essentially an override. | ||
==Conflicts settlement== | ==Conflicts settlement== | ||
ARIA usage within native markup can be result of two conflict types. This is either ARIA | ARIA usage within native markup can be the result of two conflict types. This is either ARIA overrules mapping rules of native markup or ARIA is mapped upon native markup. It depends on compatibility of ARIA role and role from native markup. Thus if roles are consistent or no ARIA role was used then ARIA is mapped on top of native markup. Otherwise ARIA suppresses any rules coming from native markup excepting some general native markup rules. | ||
===ARIA applied on top of native markup=== | ===ARIA applied on top of native markup=== | ||
In the case of compatible roles or if ARIA role is not | In the case of compatible roles or if ARIA role is not present, then user agent creates accessible for native markup element as usual with one exception. If ARIA markup and native markup are mapped to the same accessibility API properties then ARIA wins. Otherwise implementation coming from native markup accessible takes place. For example, | ||
<code><pre> | <code><pre> | ||
| Line 20: | Line 20: | ||
</pre></code> | </pre></code> | ||
Here there is no conflict between ARIA and native markup roles. User agent should create accessible objects based on original accessibles for HTML ul and HTML li elements. ARIA role and aria-selected should be mapped to accessibility API before methods of original accessible will be called. In that way, for example, accessible object created for HTML li should have selected state. | Here, there is no conflict between ARIA and native markup roles. User agent should create accessible objects based on original accessibles for HTML ul and HTML li elements. ARIA role and aria-selected should be mapped to accessibility API before methods of original accessible will be called. In that way, for example, accessible object created for HTML li should have selected state. | ||
Let's consider another example. | Let's consider another example. | ||
| Line 32: | Line 32: | ||
===ARIA suppresses native markup=== | ===ARIA suppresses native markup=== | ||
When ARIA role is incompatible with role coming from native markup then user agent should create generic accessible object. However the | When ARIA role is incompatible with role coming from native markup then user agent should create generic accessible object. However the accessible object should reflect any general rules peculiar to all elements from native markup. For example, | ||
<code><pre> | <code><pre> | ||
| Line 38: | Line 38: | ||
</pre></code> | </pre></code> | ||
Here @title attribute is peculiar to all elements of HTML document and it should be mapped to accessibility name since ARIA doesn't override it. On | Here @title attribute is peculiar to all elements of HTML document and it should be mapped to accessibility name since ARIA doesn't override it. On the other hand, user agent shouldn't create specific accessible for HTML a. In that way, for example, traversed and etc states specific for link accessibles shouldn't be exposed. | ||
Let's consider an example: | Let's consider an example: | ||
| Line 54: | Line 54: | ||
==Compatible and incompatible roles== | ==Compatible and incompatible roles== | ||
Any weak ARIA role (i.e. ARIA role not mapping to accessibility API role) is not in conflict with native markup roles, for example, "banner", "search" and other ARIA roles. | Any weak ARIA role (i.e. ARIA role not mapping to accessibility API role) is not in conflict with native markup roles, for example, "banner", "search" and other ARIA landmark roles. | ||
Not weak [http://www.w3.org/TR/wai-aria-implementation/#mapping_role ARIA roles] are compatible with predefined set of HTML elements only. | Not weak [http://www.w3.org/TR/wai-aria-implementation/#mapping_role ARIA roles] are compatible with predefined set of HTML elements only. | ||