What fresh hell is THIS now? - Patrick Lauke
<button>
is outside form
do we need type=button
?
@juryjowns: The default state is to submit a form, which only makes sense if the button
has a form
associated. Using the default does not break anything, but I personally prefer to be explicit.
But to answer your actual question, no, you don't need it.
<img>
?
required
on a <input type="checkbox">
and it gets announced as such
<button>
radio
OSX Yosemite:
text
required
--> 'required'
text
required
--> 'required invalid data'
text
required
--> 'required'
WTF, Chrome
aria-required='true'
does the right thing for all browsers, though
[juryjowns] @jitendra @jkva I agree, you don’t need it, but it certainly won’t hurt :) Especially if you’re doing a UI pattern where you’re not sure where someone might plug that button in to your code (like @marcysutton mentioned earlier) .
I did run into VO announcing buttons outside of a form as a form element awhile back… now I’m wondering if I’d set the type=button
if it would have announced it correctly.