Manchester | 26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Form Control#1065
Manchester | 26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Form Control#1065FarancisGH wants to merge 4 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
cjyuan
left a comment
There was a problem hiding this comment.
- According to https://validator.w3.org/, there are errors in your code. Can you fix them?
Suggestion: Share your code to an AI tool and ask it to review your code in terms of semantic, accessibility, typo, and consistency.
It can often help us catch errors, improve consistency, and reinforce best practices.
| <label for="red">Red</label> | ||
| <input type="radio" id="red" name="Available colours" value="red" required /> |
There was a problem hiding this comment.
- Can consider wrapping the radio button input within the label. This way, we don't need to use the
forandidattributes.
<label>Red
<input type="radio" name="Available colours" value="red" required>
</label>
- Can you find out from AI about "general practice of using mixed letter cases and space in name attributes"?
| <fieldset> | ||
| <legend>Enter your Name</legend> | ||
| <strong><label for="name">Name</label></strong> | ||
| <input type="text" id="name" name="name" required /> |
There was a problem hiding this comment.
Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?
There was a problem hiding this comment.
Hello @cjyuan ,
Thank you for your review and feedback. I have made the changes and adjustments you requested to my Form Control. Please can you review?
Thank you.
| <label id="Availablecolours">Available colours:</label> | ||
| <label>Red | ||
| <input type="radio" name="Available colours" value="red" required> | ||
| </label> | ||
| <label>Blue | ||
| <input type="radio" name="Available colours" value="blue" required> | ||
| </label> | ||
| <label>Green | ||
| <input type="radio" name="Available colours" value="green" required> | ||
| </label> |
There was a problem hiding this comment.
You could also consider using VSCode's "Format Document" feature auto format the code.
Once advantage of using it is that it can help us format the code in a consistent way.
To use the feature, right-click inside the code editor and select the option.
| <p><b>Select a colour</b></p> | ||
| <label id="Availablecolours">Available colours:</label> | ||
| <label>Red | ||
| <input type="radio" name="Available colours" value="red" required> |
There was a problem hiding this comment.
Did you ask AI about general practice of using mixed letter cases and space in the 'name' attribute?
| <input type="email" name="email" required> | ||
| </label> | ||
| </p> | ||
| <p><b>Select a colour</b></p> |
There was a problem hiding this comment.
May I suggest using an AI tool to identify ways to improve the semantics of the HTML code? (There are elements more suitable than <p> and <b> for accomplishing what you try to achieve)
| <input type="radio" name="Available sizes" value="ExtraSmall" required> | ||
| </label> | ||
| <label>S | ||
| <input type="radio" name="Available sizes" value="Small" required> | ||
| </label> | ||
| <label>M | ||
| <input type="radio" name="Available sizes" value="Medium" required> | ||
| </label> | ||
| <label>L | ||
| <input type="radio" name="Available sizes" value="Large" required> | ||
| </label> | ||
| <label>XL | ||
| <input type="radio" name="Available sizes" value="ExtraLarge" required> | ||
| </label> | ||
| <label>XXL | ||
| <input type="radio" name="Available sizes" value="DoubleExtraLarge" required> | ||
| </label> |
There was a problem hiding this comment.
Part of this code is redundant and can be slightly simplified. Can you figure out the redundant part and remove them?
There was a problem hiding this comment.
Hello @cjyuan
Please, I have made the necessary changes you asked me to make to my Form control. Can you please review it?
…cing reduntancy in the HTML code.
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good mostly. Just one request.
Note: You forgot to add the "Needs review" label.
| <fieldset> | ||
| <legend>Product Information</legend> | ||
|
|
||
| <p>Select a colour:</p> |
There was a problem hiding this comment.
"Select a colour:" does not seem like a paragraph in an article.
To improve the semantic of the markups, can you replace the <p> element by the generic block-level element?
There was a problem hiding this comment.
It seems I was incorrect. I was thinking <div> might be more appropriate than <p>, but upon checking with AI, it suggested <p> is more appropriate than <div> or <label>.
I won't go into details, you can ask AI yourself to find out more.
All good.
|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |

Learners, PR Template
Self checklist
Changelist