-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Loosen DOMString? getter to accommodate ARIA-style string reflection #10974
base: main
Are you sure you want to change the base?
Loosen DOMString? getter to accommodate ARIA-style string reflection #10974
Conversation
Can you clarify which of the paths outlined in #10037 this follows? |
@domenic Apologies, please see this latest comment in the issue: #10037 (comment). |
source
Outdated
@@ -8183,36 +8183,39 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |||
data-x="idl-DOMString">DOMString</span>?</code>:</p> | |||
|
|||
<ul> | |||
<li> | |||
<p>The getter steps are:</p> | |||
<li> |
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.
Could you please undo this throughout? We use single-space indentation.
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.
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.
Thanks! Couple more nits.
the <span>reflected IDL attribute</span> is defined to be <span>limited to only known | ||
values</span>:</p> |
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.
I think we want "limited to only known values" to continue to be an assert. (But now as a substep of this.)
I think we also want the known state assert to remain. (But now as a substep of this.)
|
||
<li><p>If <var>contentAttributeValue</var> corresponds to a state of | ||
<var>attributeDefinition</var> with no associated keyword value, then return null.</p></li> | ||
<li><p>If <var>contentAttributeValue</var> is null, then return null.</p></li> |
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.
This step is redundant with the next step so let's remove it.
Addresses #10037.
The ARIA WG is currently working on improving IDL which includes converting ARIA attributes (where applicable/possible) to be truly enumerated.
As a subtask of this general work, this PR loosens HTML spec to allow
DOMString?
reflection that is not limited to only known values. This is desirable for non-enumerated ARIA content attributes (e.g.,aria-label
,role
) where the most appropriate IDL attribute type isDOMString?
and the absence of the attribute's value is meaningful. This change will also ensure HTML-conformant reflection for future ARIA attributes that require string reflection.CC @annevk
(See WHATWG Working Mode: Changes for more details.)
/acknowledgements.html ( diff )
/common-dom-interfaces.html ( diff )