w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
654 stars 125 forks source link

Clarify spec treatment of value "undefined" (i.e., as equivalent to invalid value, initial condition for state/property usage) #2280

Closed rahimabdi closed 4 months ago

rahimabdi commented 4 months ago

Describe the change

During the June 27 2024 "undefined" deep dive discussion, @scottaohara @spectranaut suggested investigation/clarification of the following questions related to undefined treatment:

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.

spectranaut commented 4 months ago

I started to look through the spec to see if there is any concept of "invalid", and unfortunately I found a weird one in role=switch. aria-checked with the value mixed is "invalid and should be treated as false".

And in the scenario of switch, what does undefined mean? not checkable?

We could maybe say, invalid is undefined, except in the case of switch, where both invalid and undefined are the same as aria-check=false or "off".

Here is the only other mention of invalid values, in IDL: https://w3c.github.io/aria/#idl-reflection-attribute-values

spectranaut commented 4 months ago

First bullet is a duplicate of: https://github.com/w3c/aria/issues/2281

Second bullet, the question is should we spec it? Will be included in #2281