Skip to content

London | 26-ITP-Jan | Kris Oldrini | Sprint 2 | Form Controls#1140

Open
XiaoQuark wants to merge 15 commits intoCodeYourFuture:mainfrom
XiaoQuark:feature/form-controls
Open

London | 26-ITP-Jan | Kris Oldrini | Sprint 2 | Form Controls#1140
XiaoQuark wants to merge 15 commits intoCodeYourFuture:mainfrom
XiaoQuark:feature/form-controls

Conversation

@XiaoQuark
Copy link

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

Changelist

This PR adds a semantic HTML form for ordering a t-shirt, following the given requirements.

Form Structure

  • Created a form using semantic HTML elements including form, fieldset, and legend to group related inputs.
  • Added a header with a page title and instructions for completing required fields.
  • Added a footer with author information.
  • Marked all fields as required using the required attribute.
  • Used only HTML as required by the task.

Customer Information

  • Added a required name input using type="text" with a minimum length of 2 characters for validation.
  • Added a required email input using type="email" and a regex pattern for validation.
  • Associated all inputs with elements for accessibility.

T-shirt Options

  • Added a colour selection using radio buttons, limiting the user to one choice from three defined colours (Red, Blue, Yellow).
  • Included colour square emojis using Unicode to visually represent each colour without using CSS.
  • Added a size selection using a dropdown with six available sizes: XS, S, M, L, XL, XXL. Included a disabled placeholder option to ensure the user must actively choose a size. Accessibility & Testing Ensured all form controls have properly associated labels. Added meta description to improve page metadata SEO. Tested the form using browser validation to ensure required fields and input types behave correctly. Verified the page achieves a Lighthouse score of 100 on all aspects.

@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 385841d
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6984c86e7b2d0d0008879fb2
😎 Deploy Preview https://deploy-preview-1140--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: 91 (🟢 up 5 from production)
PWA: -
View the detailed breakdown and full score reports

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

@XiaoQuark XiaoQuark added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 5, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 5, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@XiaoQuark XiaoQuark changed the title Feature/form controls London | 26-ITP-Jan | Kris Oldrini | Sprint 2 | Form Controls Feb 5, 2026
@XiaoQuark XiaoQuark added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 5, 2026
@iprithv iprithv removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 5, 2026
<fieldset>
<legend>Colours</legend>
<!-- colours input, limit to 3 colours only -->
<p>Please select a colour *</p>
Copy link

Choose a reason for hiding this comment

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

We can make this, <legend>Please select a colour *</legend>

Screen readers announce legends, not surrounding text.

Copy link
Author

Choose a reason for hiding this comment

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

I will do that, thank you. I just have a question: does it mean that radio buttons should always be inside a fieldset? Because I don't think I can create a "group" label, only one for each input. Unless there's another trick I could not find.

value="yellow"
/>
<label for="yellow">&#x1F7E8; Yellow </label>
</p>
Copy link

Choose a reason for hiding this comment

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

The <p> is not needed.

pattern like below is not needed,

<li>
  <p>
    <input>
    <label>
  </p>
</li>

we can have cleaner,

<li>
  <input>
  <label>
</li>

this goes to some places on top as well

Copy link
Author

Choose a reason for hiding this comment

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

Absolutely agree. I wouldn't normally add a

inside a list item, but Lighthouse was not happy with the list's tiny spacing, and, because I could not use CSS, I tried to improvise.
So now I'm not sure if I can remove them or leave forever.

id="email"
name="customerEmail"
placeholder="jsmith@email.com"
pattern="^[\w.-]+@[\a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
Copy link

Choose a reason for hiding this comment

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

\a is invalid inside character class
Browsers already validate emails using: type="email"

you can remove the pattern completely
<input type="email" ... required />

Copy link
Author

Choose a reason for hiding this comment

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

Ops, that was a missed typo. I've corrected it now, thank you

Copy link
Author

Choose a reason for hiding this comment

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

When you say remove the pattern do you mean for this specific sprint or in general?

@iprithv iprithv added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Feb 5, 2026
Copy link

@iprithv iprithv left a comment

Choose a reason for hiding this comment

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

Above are suggestions. Other than that this submission meets the expected learning outcomes for the exercise.
It demonstrates understanding of form structure and validation fundamentals, and shows readiness to continue progressing through the module. Nice work @XiaoQuark

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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants