Accessibility/Datatypes
Jump to navigation
Jump to search
Proposal
- Change aaa:datatype attribute name to aaa:type (to match what's used with schema)
- Allow aaa:type attribute to point to any schema, e.g. type="my:phonenumber"
- The user agent will parse the data type pointed to and provide the following information via ATK/AT-SPI/IAccessible2 object attributes (which can expose arbitrary string values)
- Each element on the page can utilize a simple type, and the schema can define the xs:restrictions as well as the xs:use attribute
- If a complex type is used, it makes the most sense to map this to multiple elements on the page, each with its own simple type
| Type information | Object attribute or state | Notes |
|---|---|---|
| aaa:type | "xs-type" | |
| xs:base | "xs-basetype" | What the type is derived from. Must be one of the built-in types such as xs:integer. If original aaa:type is one of the built-in types, then this will be the same. |
| xs:minLength | "xs-minlength" | |
| xs:maxLength | "xs-maxlength" | |
| xs:length | "xs-minlength" and "xs-maxlength" | Expose these two attributes with the same value |
| xs:totalDigits | "xs-totaldigits" | |
| xs:fractionDigits | "xs-fractiondigits" | |
| xs:use="fixed" | "valuenow" | Also sets readonly state (overrides aaa:readonly). Author should also set aaa:valuenow to the same value, and not allow changes. In the case of a difference, the schema will override aaa:valuenow. |
| xs:use="default" | Not mapped, because author should be responsible to fill in aaa:valuenow on element initialization | |
| xs:use="required" | required state | same as aaa:required. aaa true, required state will be set |
| xs:whiteSpace | "xs-whitespace" | |
| xs:pattern | "xs-pattern" | |
| xs:enumeration | string2|string3"), with appropriate characters escaped with a backslash | same functionality as xs:pattern, so to simplify we expose the same way |
| xs:minInclusive | "xs-valuemin" | When aaa:valuemin is also set, the schema minimum value will be used |
| xs:maxInclusive | "xs-valuemax" | When aaa:valuemax is also set, the schema maximum value will be used |
| xs:minExclusive | "xs-valuemin" + "xs-exclude-min" = "true" | |
| xs:maxExclusive | "xs-valuemax" + "xs-exclude-max" = "true" | |
| xs:union | "xs-pattern" | This must be generated as a fixup to "xs-pattern" using the OR operator |
| xs:list | "xs-list"="true" and change "xs-base" to the specified xs:itemType for the list |