Skip to content

Manchester | 26-ITP-Sep | Aklilu Mihtsun | Sprint 1 | Form Controls - #1499

Open
AkliluMihtsun wants to merge 7 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:feature/form-controls
Open

AkliluMihtsun wants to merge 7 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:feature/form-controls

Conversation

@AkliluMihtsun

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1004

Changelist

-Used semantic HTML elements to improve the structure and accessibility of the page
-Added a structured customer/product form using

and multiple sections
-Added elements to describe each fieldset
-Added required validation to fields that must be completed
-Added a pattern to ensure the customer's name contains at least two non-space characters
-Added styling for the page layout and form
-Checked the page with Lighthouse and achieved an Accessibility score of 100

Questions

-The "for" attribute in labels does it point to the id or name of the input?
-Why does the required attribute does not have value? Can we put value?

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit d696e45
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aa43a8a23a3df00089a3b25
😎 Deploy Preview https://deploy-preview-1499--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@AkliluMihtsun AkliluMihtsun added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 12, 2026
@tiakavousi tiakavousi added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 14, 2026
@tiakavousi

Copy link
Copy Markdown

Nice work!

You've made a solid start: semantic structure with header/main/footer, proper fieldset/legend grouping, and every label is correctly tied to its input with for/id. But there is a mix of must-fix issues and polish suggestions. Please add the Needs Review label again once you've pushed.

@tiakavousi tiakavousi added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 14, 2026
Comment thread Form-Controls/index.html
<legend>T-shirt Colour and Size</legend>
<p>
<label for="red">Red</label>
<input type="radio" id="red" name="colour">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Radio buttons have no value attribute. Have you considered what value will be submitted for colour when the user selects for example Red?

Comment thread Form-Controls/index.html
<legend>T-shirt Colour and Size</legend>
<p>
<label for="red">Red</label>
<input type="radio" id="red" name="colour">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is selecting a colour optional according to the requirements? If not, how could you make sure the user cannot submit the form without choosing one?

Comment thread Form-Controls/index.html
</p>

</fieldset>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where the user can submit the form? Check the requirements and consider adding an appropriate submit control.

Comment thread Form-Controls/index.html
</form>
</main>
<footer>
<!-- change to your name-->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment can be removed as it is only a reminder for you

Comment thread Form-Controls/index.html
@@ -16,12 +17,57 @@ <h1>Product Pick</h1>
<!-- write your html here-->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably some tidying up needed here as the comments are meant for you to write the code and then they can be removed

Comment thread Form-Controls/index.html
</p>
<p>
<label for="size">Tshirt Size</label>
<select id="size" name="size">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now XS is pre-selected, so a user can submit without consciously choosing a size. How we can avoid this?

Comment thread Form-Controls/index.html
-What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern
-What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?
-What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL -->
<fieldset>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is inconsistent, please consider using tools like Prettier to auto format your files

Comment thread Form-Controls/index.html
<legend>Customer Information</legend>
<p>
<label for="customerName">Customer Name</label>
<input id="customerName" name="customerName" type="text" pattern=".*\S.*\S.*" required>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that the customerName input has validation using required and pattern. How will the user know what is expected before submitting the form? Consider how you could communicate the requirement (at least two non-space characters) to the user so they can provide a valid value on the first attempt and avoid unnecessary round trips.

Comment thread Form-Controls/style.css

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Radio button layout is unaddressed

No focus styles : Removing/relying on default focus rings is an accessibility issue for keyboard users. Add a visible focus indicator

select uses margin-left while text inputs use display: block. This is inconsistent please pick one pattern for the whole form so it feels cohesive

Footer is bold but has no spacing or alignment. A little breathing room is nice here , maybe adding some padding and margin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants