From e7883a9e414ac1c105425b89780b3889d7f5eec6 Mon Sep 17 00:00:00 2001 From: Joseph Scheuhammer Date: Thu, 25 Jun 2015 11:50:43 -0400 Subject: [PATCH] ACTION-1606,1493/ISSUE-646: Implicit values for valuemin, max, and now. Added rules for implicit values of aria-valuemin, aria-valuemax, and aria-valuenow when used with roles that require them, namely scrollbar, sider, and spinbutton. --- aria/aria.html | 54 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/aria/aria.html b/aria/aria.html index 5dca52b9c..cb104c729 100644 --- a/aria/aria.html +++ b/aria/aria.html @@ -5827,6 +5827,14 @@
Editorial Note regarding the ARIA 1.1 A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.

A scrollbar represents the current value and range of possible values via the size of the scrollbar and position of the thumb with respect to the visible range of the orientation (horizontal or vertical) it controls. Its orientation represents the orientation of the scrollbar and the scrolling effect on the viewing area controlled by the scrollbar. It is typically possible to add or subtract to the current value by using directional keys such as arrow keys.

Authors MUST set the aria-controls attribute on the scrollbar element to reference the scrollable area it controls.

+

Authors MUST set the aria-valuemin, aria-valuemax, and aria-valuenow attributes. If missing, their implicit values follow the same rules as the HTML range input type:

+
    +
  • If aria-valuemin is missing or not a number, it defaults to 0 (zero).
  • +
  • If aria-valuemax is missing or not a number, it defaults to 100.
  • +
  • If aria-valuenow is missing or not a number, it defaults to the value half way between aria-valuemin and aria-valuemax.
  • +
  • If aria-valuenow is present but less than aria-valuemin, it defaults to the value of aria-valuemin.
  • +
  • If aria-valuenow is present but greater than aria-valuemax, it defaults to the value of aria-valuemax.
  • +

Elements with the role scrollbar have an implicit aria-orientation value of vertical.

Assistive technologies generally will render the value of aria-valuenow as a percent of a tange between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified. It is best to set the values for aria-valuemin, aria-valuemax, and aria-valuenow in a manner that is appropriate for this calculation.

@@ -5912,7 +5920,12 @@
Editorial Note regarding the ARIA 1.1 Implicit Value for Role: - Default for aria-orientation is vertical. + + Default for aria-orientation is vertical.
+ Default for aria-valuemin is 0.
+ Default for aria-valuemax is 100.
+ Default for aria-valuenow is half way between aria-valuemax and aria-valuemin. + @@ -5923,6 +5936,14 @@
Editorial Note regarding the ARIA 1.1

A user input where the user selects a value from within a given range.

A slider represents the current value and range of possible values via the size of the slider and position of the thumb. It is typically possible to add or subtract to the value by using directional keys such as arrow keys.

+

Authors MUST set the aria-valuemin, aria-valuemax, and aria-valuenow attributes. If missing, their implicit values follow the same rules as the HTML range input type:

+
    +
  • If aria-valuemin is missing or not a number, it defaults to 0 (zero).
  • +
  • If aria-valuemax is missing or not a number, it defaults to 100.
  • +
  • If aria-valuenow is missing or not a number, it defaults to the value half way between aria-valuemin and aria-valuemax.
  • +
  • If aria-valuenow is present but less than aria-valuemin, it defaults to the value of aria-valuemin.
  • +
  • If aria-valuenow is present but greater than aria-valuemax, it defaults to the value of aria-valuemax.
  • +

Elements with the role slider have an implicit aria-orientation value of horizontal.

@@ -6005,7 +6026,12 @@
Editorial Note regarding the ARIA 1.1
- +
Implicit Value for Role:Default for aria-orientation is horizontal. + Default for aria-orientation is horizontal.
+ Default for aria-valuemin is 0.
+ Default for aria-valuemax is 100.
+ Default for aria-valuenow is half way between aria-valuemax and aria-valuemin. +
@@ -6017,6 +6043,14 @@
Editorial Note regarding the ARIA 1.1 A form of range that expects the user to select from among discrete choices.

A spinbutton typically allows the user to select from the given range through the use of an up and down button on the keyboard. Visibly, the current value is incremented or decremented until a maximum or minimum value is reached. Authors SHOULD ensure this functionality is accomplished programmatically through the use of up and down arrows on the keyboard.

Although a spinbutton is similar in appearance to many presentations of select, it is advisable to use spinbutton when working with known ranges (especially in the case of large ranges) as opposed to distinct options. For example, a spinbutton representing a range from 1 to 1,000,000 would provide much better performance than a select widget representing the same values.

+

Authors MUST set the aria-valuemin, aria-valuemax, and aria-valuenow attributes. If missing, their implicit values follow the same rules as the HTML range input type:

+
    +
  • If aria-valuemin is missing or not a number, it defaults to 0 (zero).
  • +
  • If aria-valuemax is missing or not a number, it defaults to 100.
  • +
  • If aria-valuenow is missing or not a number, it defaults to the value half way between aria-valuemin and aria-valuemax.
  • +
  • If aria-valuenow is present but less than aria-valuemin, it defaults to the value of aria-valuemin.
  • +
  • If aria-valuenow is present but greater than aria-valuemax, it defaults to the value of aria-valuemax.
  • +
@@ -6100,6 +6134,14 @@
Editorial Note regarding the ARIA 1.1 Inherits Presentational:
+ + + +
Characteristics:
 
Implicit Value for Role: + Default for aria-valuemin is 0.
+ Default for aria-valuemax is 100.
+ Default for aria-valuenow is half way between aria-valuemax and aria-valuemin. +
@@ -10458,10 +10500,10 @@

State and Property Attribute Processing

State and property attributes are included in host languages, and therefore syntax for representation of their value types is governed by the host language. For each of the value types defined in Value, an appropriate value type from the host language is used. Recommended correspondences between WAI-ARIA value types and various host language value types are listed in Mapping WAI-ARIA Value types to languages. This is a non-normative mapping in order to accommodate new host languages supporting WAI-ARIA.

The list value types—ID reference list and token list—allow more than one value of the given type to be provided. The values are separated by delimiter characters recognized by the host language for list attributes, such as space characters, commas, etc. Some languages may require a specific, single delimiter, while others may allow various delimiters.

Global states and properties are supported on any element in the host language. However, authors MUST only use non-global states and properties on elements with a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language semantic matching an appropriate WAI-ARIA role. When a role attribute is added to an element, the semantics and behavior of the element, including support for WAI-ARIA states and properties, are augmented or overridden by the role behavior. User agents MUST ignore non-global states and properties used on an element without a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language semantic matching an appropriate WAI-ARIA role. For example, the aria-valuetext attribute may be used on a progressbar.

-

WAI-ARIA roles have associated states and properties that are qualified as "supported" or "required". For example, aria-autocomplete is a supported property of the combobox role: a given combobox might or might not implement auto completion. In addition, the combobox role requires the aria-expanded state in order to indicate whether its descendant listbox is currently open.

-

When WAI-ARIA roles are used, supported states and properties that are not present in the DOM are treated according to their default value -- their default value is equivalent to their absence. Keeping with the combobox example, a missing aria-autocomplete attribute is the same as its default value none, meaning the combobox does not offer auto completion.

-

In contrast, required states and properties that are absent are an author error. Missing required states and properties are treated as if they were present and have an implicit neutral value that is not necessarily their default value. For example, the default value of aria-expanded is undefined, meaning neither expandable nor collapsible. However, its implicit value for a combobox is false, meaning collapsed. The characteristics table associated with each WAI-ARIA role has an "Implicit Value for Role:" entry that specifies the value to use for that role when a required state or property is missing. Editorial Note: There are roles whose required states/properties do not list an implicit value, e.g., slider/aria-valuenow. Is this a bug?

-

Sometimes states and properties are present in the DOM but have a zero-length string ("") as their value. This is equivalent to their absence. Therefore, user agents SHOULD treat state and property attributes with a value of "" the same as they treat an absent attribute. For supported states and properties this corresponds to the default value, but if it is a required attribute, it signals an author error, and the implicit value for the role is used.

+

WAI-ARIA roles have associated states and properties that are qualified as "supported" or "required". An example of a property that is supported by the combobox role is aria-autocomplete. The property is designated "supported" in this case because a given combobox might or might not implement auto completion. In contrast, the combobox role requires the aria-expanded state in order to indicate whether its descendant listbox is currently open.

+

When WAI-ARIA roles are used, supported states and properties that are not present in the DOM are treated according to their default value. Keeping with the combobox example, a missing aria-autocomplete attribute is the same as its default value none, meaning the combobox does not offer auto completion.

+

However, states and properties that are required by a role but are absent are an author error. Missing required states and properties are treated as if they were present and have an implicit neutral value that is not necessarily their default value. For example, the default value of aria-expanded is undefined, meaning neither expandable nor collapsible. However, its implicit value for the combobox role is false, meaning collapsed. The characteristics table associated with each WAI-ARIA role has an "Implicit Value for Role" entry that specifies the value to use for that role when a required state or property is missing.

+

Sometimes states and properties are present in the DOM but have a zero-length string ("") as their value. This is equivalent to their absence. User agents SHOULD treat state and property attributes with a value of "" the same as they treat an absent attribute. For supported states and properties this corresponds to the default value, but if it is a required attribute, it signals an author error, and the implicit value for the role is used.