w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

Include <input> with <input type=text> #242

Closed AlexLloyd0 closed 3 years ago

AlexLloyd0 commented 3 years ago

According to https://html.spec.whatwg.org/multipage/input.html, type=text is both the missing value default and the invalid value default.


Preview | Diff

carmacleod commented 3 years ago

Makes sense to me to add "or a missing or invalid type", but I think the type attribute should still be first, even though it may lead to slightly awkward language. The consistency makes it easier for a person scanning the document to find what they are looking for.

@scottaohara Do you agree?

OLD

input type=text, with no list attribute

NEW

input with no list attribute, and with type=text, or a missing or invalid type.

NEW with type first

input type=text or a missing or invalid type, with no list attribute

OLD

input type=text, search, tel, url, or email with a list attribute

NEW

input with a list attribute and with type=text, search, tel, url, email, or a missing or invalid type.

NEW with type first

input type=text, search, tel, url, email or a missing or invalid type, with a list attribute

scottaohara commented 3 years ago

@carmacleod yes, would prefer the type staying first. that was my initial reaction to reviewing the PR prior to seeing your additional comment. But at a high level, agree this clarity is helpful here.

cc @AlexLloyd0

AlexLloyd0 commented 3 years ago

Fair point, I was optimising for local readability rather than global consistency. Updated to the suggested wording :)