We’re all just temporarily abled.
Cindy Li
Use semantic markup.
(Worry less about ARIA.)
(Write less JavaScript.)
(Future-proof your apps.)
<label>
Username
<input type="text" />
</label>
<label for="username">Username</label>
<input id="username" type="text" />
{{#let (unique-id) as |usernameId|}}
<label for={{usernameId}}>Username</label>
<input id={{usernameId}} type="text" />
{{/let}}
<label for="username">Username</label>
<input id="username" type="text"
aria-describedby="username-hint">
<p id="username-hint">Username must be
at least 8 characters long and cannot
contain special characters.</p>
typeSemantically identifies the type of content the input accepts.
Occasionally suggests more specific labels for screen readers.

autocompleteTells browsers what user data to offer as autocomplete options.
Mapped to accessibility state.

inputmodeSuggests the ideal on-screen keyboard for mobile devices.
No accessibility mappings.
<input
type="text"
autocomplete="username"
/>


<input
type="text"
autocomplete="username"
autocorrect="off"
autocapitalize="none"
spellcheck="false"
/>
<input
type="email"
autocomplete="email"
/>


<input
type="tel"
autocomplete="tel"
/>


<input
type="text"
autocomplete=
"street-address"
/>


<input
type="number"
/>
“inappropriate for credit card numbers or US postal codes”
(HTML Spec)
<input
type="text"
inputmode="decimal"
pattern="[0-9]*"
/>


<input
type="text"
inputmode="decimal"
autocomplete="one-time-code"
/>
<input
type="date"
/>
<input
type="text"
inputmode="decimal"
minlength="1"
maxlength="2"
/>
<input
type="text"
inputmode="decimal"
minlength="1"
maxlength="2"
/>
<input
type="text"
inputmode="decimal"
minlength="4"
maxlength="4"
/>
<fieldset>
<legend>Start Date</legend>
<label for="month">Month (MM)</label>
<input id="month" type="text" inputmode="decimal" />
<label for="day">Day (DD)</label>
<input id="day" type="text" inputmode="decimal" />
<label for="year">Year (YYYY)</label>
<input id="year" type="text" inputmode="decimal" />
</fieldset>
font-size of 16pxBy solving a11y issues at the
semantic level, we…
jdsteinbach