-
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
Update "undefined" definition in section 6.2.4 Value (within 6.2 Characteristics of States and Properties) #2172
base: main
Are you sure you want to change the base?
Changes from 1 commit
48bf370
5bce014
66c640c
4e2775b
839c476
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10013,7 +10013,7 @@ <h3>Value</h3> | |
<dt id="valuetype_tristate">tristate</dt> | ||
<dd>Value representing <code>true</code>, <code>false</code>, <code>mixed</code>, or <code>undefined</code> values. The default value for this value type is <code>undefined</code> unless otherwise specified.</dd> | ||
<dt id="valuetype_true-false-undefined">true/false/undefined</dt> | ||
<dd>Value representing <code>true</code>, <code>false</code>, or <code>undefined</code> (not applicable). The default value for this value type is <code>undefined</code> unless otherwise specified. For example, an element with <sref>aria-expanded</sref> set to <code>false</code> is not currently expanded; an element with <sref>aria-expanded</sref> set to <code>undefined</code> is not expandable.</dd> | ||
<dd>Value representing <code>true</code>, <code>false</code>, or <code>undefined</code> (not applicable). Unless otherwise specified, the default value for this value type is <code>undefined</code>. Note that the value <code>undefined</code> conveys a state- or property-dependent behavior including but not limited to lack of support (e.g., <sref>aria-checked</sref>, <sref>aria-pressed</sref>), equivalence with the value <code>false</code> (e.g., <sref>aria-multiselectable</sref>), behavior determined by the user agent (e.g., <sref>aria-hidden</sref>) or non-applicability (e.g., <sref>aria-selected</sref>). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's actually even more complex than this :/. For example, I do also think I agree with Valerie that it'd be helpful to clarify that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think "undefined" needs to be yanked out of the As a user of the spec, this is what I might expect (fake example) so I could make sense of it:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aardrian would it help if this section had a link to the IDL reflection section just after it, in addition to text clarifying that It does get weirder, in that while you can explicitly set e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @aardrian @smhigley. As @spectranaut noted, it's currently ambiguous if the value undefined is the string "undefined" or undefined as in not present (or the value
I'm also observing that attr = "undefined" passes HTML validation (W3C Validator). Is this intended or a bug? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rahimabdi yeah, I believe that's a pretty straightforward mistake in the spec. I made a test page to output the browser-mapped values when ARIA attributes are set to the string I checked it in Chrome, Edge, Safari, and Firefox on macOS and Windows (Safari only on mac), and all of them had different results for the string My proposal would be that we go through the spec and remove any instances accidentally using string As an aside, I do get an error for |
||
<dt id="valuetype_idref">ID reference</dt> | ||
<dd>Reference to the ID of another <a>element</a> in the same document</dd> | ||
<dt id="valuetype_idref_list">ID reference list</dt> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this really shows how inconsistent we have been with the use of undefined 😅
I wonder if we should include the examples, or leave it at
Note that the value undefined conveys a state- or property-dependent behavior, consult the values table of the relevant state or property to understand the meaning of an undefined state or property.