-
-
Notifications
You must be signed in to change notification settings - Fork 466
London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated #1090
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,15 +13,56 @@ <h1>Product Pick</h1> | |
| </header> | ||
| <main> | ||
| <form> | ||
| <!-- write your html here--> | ||
| <!-- | ||
| try writing out the requirements first as comments | ||
| this will also help you fill in your PR message later--> | ||
|
|
||
| <div> | ||
| <label for="name">Name</label> | ||
| <input type="text" name="name" id="name" placeholder="username" minlength="2" required/> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="email">Email</label> | ||
| <input type="email" name="email" id="email" required /> | ||
| </div> | ||
|
|
||
| <fieldset> | ||
| <legend>Choose a Colour </legend> | ||
| <div> | ||
| <label for="red">Red</label> | ||
| <input type="radio" name="colour" id="red" value="red" required /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can consider wrapping the input element inside the label tags: This way, we don't need to use the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @cjyuan , Below are the changes i have made according to the feedback given:
Regarding the remaining Lighthouse warning, without using CSS it isn’t possible to increase the physical size of form controls, so I’ve applied the best possible HTML-only solution. According to the bot, however, this scores 100 on Accessibility
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Netlify may be using a different version of Lighthouse or different settings when calculating the accessibility score. I think the browser's score is more reliable. The no-CSS requirement is unusual in practice, but the fix is not difficult (and a bit silly). Just think of it as a puzzle.
|
||
| </div> | ||
|
|
||
| <div> | ||
| <label for="Green">Green</label> | ||
| <input type="radio" name="colour" id="Green" value="Green" /> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="Blue">Blue</label> | ||
| <input type="radio" name="colour" id="Blue" value="blue" /> | ||
| </div> | ||
| </fieldset> | ||
|
|
||
|
|
||
| <div> | ||
| <label for="Sizes">Size</label> | ||
| <select name="Size" id="Sizes" required> | ||
| <option value="">Select a size </option> | ||
| <option value="XS">XS</option> | ||
| <option value="S">S</option> | ||
| <option value="M">M</option> | ||
| <option value="L">L</option> | ||
| <option value="XL">XL</option> | ||
| <option value="XXL">XXL</option> | ||
| </select> | ||
| </div> | ||
|
|
||
| <button type="reset">Reset</button> | ||
| <button type="submit">Submit</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <h2>By HOMEWORK SOLUTION</h2> | ||
| <h2>By GLORIA MANKRADO</h2> | ||
| </footer> | ||
| </body> | ||
| </html> | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the
patternattribute to disallow any name that contains only space characters?