Skip to content

[html-aam PR 395] add validity IDL #2223

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15435,6 +15435,19 @@ <h4 id="att-usemap">`usemap`</h4>
<th>Comments</th>
<td>Refer to <a href="#el-img">`img`</a> element.</td>
</tr>
<tr tabindex="-1" id="att-validity">
<th>`validity [IDL]`</th>
<td class="elements">
HTML elements;
<a data-cite="html/#the-input-element:dom-cva-validity">`input`</a>
</td>
<td class="aria"><a class="core-mapping" href="#ariaInvalidTrue">`aria-invalid`</a> ="true"</td>
<td class="ia2">Use WAI-ARIA mapping</td>
<td class="uia">Use WAI-ARIA mapping</td>
<td class="atk">Use WAI-ARIA mapping</td>
<td class="ax">Use WAI-ARIA mapping</td>
<td class="comments">If the element has the `validity [IDL]` set and the `aria-invalid` attribute set, User Agents MUST expose only the`validity [IDL]` state.</td>
Copy link
Contributor

@cookiecrook cookiecrook Apr 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think el.ariaInvalid would stilll need to be exposed… in part because I don't know how to remove it with a HTMLInputElement ILD override, so we could leave it and expose as null. @rahimabdi @annevk what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not entirely clear to me what the requirement here is.

It's also not clear to me why tests couldn't be written for this.

Is the idea that if the form element is considered valid per HTML's requirements, aria-invalid is to be ignored? I think that should happen on the AT layer and attribute reflection shouldn't really be involved in that. (Thus if you set the aria-invalid attribute, the ariaInvalid getter will still reflect that, even if it's valid.)

</tr>
</tbody>
</table>
<h4 id="att-value-button">`value`</h4>
Expand Down
Loading