aria icon indicating copy to clipboard operation
aria copied to clipboard

Definition discrepancies for the "undefined" value across ARIA states and properties

Open rahimabdi opened this issue 1 year ago • 4 comments

Describe the change

As of ARIA 1.3, aria-hidden="false" will be a synonym of aria-hidden="undefined". However, I noticed that the "undefined" value is now differently defined for various states and properties, e.g.,:

  • aria-checked="undefined" means that "The element does not support being checked."; similarly, aria-pressed="undefined" means that "The element does not support being pressed."
  • aria-expanded="undefined" means that "The element does not own or control a grouping element that is expandable."
  • aria-orientation="undefined" means that "The element's orientation is unknown/ambiguous."

For aria-hidden="undefined", it equates to "The element's hidden state is determined by the user agent based on whether it is rendered."

With the changes to aria-hidden, should we update section 6.2.4 Value and provide a broad definition of what "undefined" means, or perhaps note that it is property-dependent? The current definition of "undefined" does not appear to encompass the full breadth of what this value means:

true/false/undefined Value representing true, false, or undefined (not applicable). The default value for this value type is undefined unless otherwise specified. For example, an element with aria-expanded set to false is not currently expanded; an element with aria-expanded set to undefined is not expandable.

Link to the version of the specification or documentation you were looking at

Link to documentation: https://w3c.github.io/aria/

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?

Yes

rahimabdi avatar Apr 12 '24 22:04 rahimabdi

Maybe the "not applicable" in the parenthesis could be replaced with the wording and examples you've provided, something like:

true/false/undefined Value representing true, false, or undefined (The meaning of 'undefined' is attribute dependent. For example, aria-checked="undefined" means that "The element does not support being checked", while aria-hidden="undefined" is a synonym for aria-hidden="false".). The default value for this value type is undefined unless otherwise specified. For example, an element with aria-expanded set to false is not currently expanded; an element with aria-expanded set to undefined is not expandable.

KateZhaoTR avatar Apr 17 '24 18:04 KateZhaoTR

@rahimabdi are you interested in drafting a PR with the definition of undefined you suggest?

spectranaut avatar Apr 18 '24 17:04 spectranaut

@spectranaut Yes, happy to do so!

Compiling all the uses of undefined and their respective meanings here:

  • aria-checked = The element does not support being checked
  • aria-current = Does not represent the current item within a set
  • aria-expanded = Element does not own or control a grouping element that is expandable
  • aria-grabbed = Indicates that the element does not support being dragged
  • aria-hidden = The element’s hidden state is determined by the user agent on whether it is rendered
  • aria-orientation = The element’s orientation is unknown or ambiguous
  • aria-pressed = The element does not support being pressed
  • aria-selected = The element is not selectable
  • aria-multiselectable = Only one item can be selected

rahimabdi avatar Apr 27 '24 19:04 rahimabdi

Meeting minutes from June 27 ARIA WG "undefined" deep dive: https://github.com/w3c/aria/issues/2177#issuecomment-2226727206.

rahimabdi avatar Jul 13 '24 02:07 rahimabdi