-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify "undefined" assignment for a state/property as the value (not the string) #2177
Comments
@rahimabdi could you clarify how you're testing the not-string |
Also dropping this here as well (I posted it in a reply comment in a PR, but thought it'd be easier to find here too):
|
Discussed briefly during the ARIA working group meeting: https://www.w3.org/2024/05/16-aria-minutes#t09 Consensus that the string "undefined" should not be considered undefined. |
@smhigley For the I think the spec may benefit from greater clarity on what it means for a state/property to be undefined, and to delaminate all the ways something can be undefined. I counted the following techniques:
|
I am on board with consistency within the spec itself. Are you proposing a PR to do so? Otherwise I cannot tell from your comment what you feel the next step should be. |
Do I understand it correctly: PROPERTY=undefined and PROPERTY is not set results in the value undefined; and PROPERTY="undefined" or PROPERTY="" is not undefined. If so we should correct it in the specs. |
ARIA WG "undefined" deep dive meeting notes from Thursday June 27 2024:
|
Capturing my notes from an IDL meeting with @rahimabdi and @annevk a few weeks ago.
The ARIA spec is not in line with the algorithm defined below this portion of the HTML spec: search for “If a reflected IDL attribute has the type For web compatibility reasons, implementations would never be able to retrofit the numeric strings to number types, but if needed in the future, we could add another accessor, as was done with CSS ARIA WG could consider not adding new Another complication that I forgot to discuss during that meeting is that, without the nullable ARIA WG should consider adding notes in the spec (or in a wiki) documenting why these decisions were made. |
Adding Agenda+ to discuss potential actions at an upcoming WG meeting. In particular, do we want to track issues for:
|
Discussed briefly in Aug 9th ARIA WG meeting: https://www.w3.org/2024/08/08-aria-minutes#t08 |
Describe the change
In order to address #2156, @spectranaut /@smhigley /@aardrian suggested clarification in the spec of how to assign
undefined
for states and properties; namely, to clarify thatundefined
represents a value (e.g.,aria-expanded=undefined
) rather than a string (e.g.,aria-expanded="undefined"
). This change may also involve explicitly stating the absence of a value is equivalent toundefined
.It's unclear where this should be documented (perhaps Section 6.2 Characteristics of States and Properties).
Unconventional techniques for assigning an
undefined
valueThere may need to be additional clarification on the following assignment methods:
stateOrProperty = ""
(this one is referenced in thearia-current
section as being allowed via the empty string, i.e., "If the attribute is not present or its value is the empty string...")stateOrProperty = null
Potentially erroneous spec examples of
"undefined"
string valueThe following two
undefined
references use the string value which may be confusing and require updating:aria-hidden
state description section:Validator testing of
undefined
vs."undefined"
W3C HTML Validator shows the following parsing results when
undefined
is assigned as a value (stateOrProperty=undefined
) vs. a string (stateOrProperty="undefined"
).For states/properties that support explicit assignment of
undefined
:"undefined"
stringundefined
valuearia-checked
role="checkbox"
,role="radio"
aria-current
(may be missingundefined
in its Values table, see #2176)<button>
,<a>
,role="button"
,role="link"
aria-expanded
<button>
,<a>
,role="button"
,role="link"
aria-grabbed
aria-hidden
(very recently added as part of #2090)<button>
,<a>
,role="button"
,role="link"
aria-orientation
role="scrollbar"
,"role="slider"
,role="tablist"
aria-pressed
<button>
,role="button"
aria-selected
role="tab"
aria-multiselectable
(may be missingundefined
in its Values table, see #2176)role="tablist"
,role="listbox"
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.
The text was updated successfully, but these errors were encountered: