Applied Accessibility -8 Add an Accessible Date Picker

 Add an Accessible Date Picker

Forms often include the input field, which can be used to create several different form controls. The type attribute on this element indicates what kind of input will be created.

You may have noticed the text and submit input types in prior challenges, and HTML5 introduced an option to specify a date field. Depending on browser support, a date picker shows up in the input field when it's in focus, which makes filling in a form easier for all users.

For older browsers, the type will default to text, so it helps to show users the expected date format in the label or as placeholder text just in case.




Tell us the best date for the competition



here is corresponding html code: 


<form>
<label for="pickdate">Preferred Date:</label>
<input id="pickdate" name="pickdate" type="date" />
<input name="submit" type="submit" value="Submit" />
</form>

source

Comments

Popular posts from this blog

ES6 : 5 Prevent Object Mutation

ES6: 1 Explore Differences Between the var and let Keywords

CSS Grid: Reduce Repetition Using the repeat Function