Skip to content

Manchester | 26-ITP-May| Abid Akhtar| Sprint 1| Form Controls#1358

Open
AbidAkhtar-tech wants to merge 8 commits into
CodeYourFuture:mainfrom
AbidAkhtar-tech:Abid/Sprint1/FormControls
Open

Manchester | 26-ITP-May| Abid Akhtar| Sprint 1| Form Controls#1358
AbidAkhtar-tech wants to merge 8 commits into
CodeYourFuture:mainfrom
AbidAkhtar-tech:Abid/Sprint1/FormControls

Conversation

@AbidAkhtar-tech
Copy link
Copy Markdown

@AbidAkhtar-tech AbidAkhtar-tech commented May 27, 2026

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

Changes

  • Added semantic HTML form
  • Added accessible labels and fieldsets
  • Added validation for name and email
  • Added colour and size radio buttons
  • Added CSS styling

This PR adds an accessible T-shirt order form using semantic HTML and CSS.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit b2a7ad8
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6a1c78210cc9460008d92d84
😎 Deploy Preview https://deploy-preview-1358--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: 85 (🔴 down 1 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.

@AbidAkhtar-tech AbidAkhtar-tech added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 27, 2026
Comment thread Form-Controls/index.html Outdated
Comment on lines +22 to +23
<label for="username">Name</label>
<input type="text" id="username" minlength="2" required autocomplete="name">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you update this input element so that it can reject name containing only space characters? For example, " " (a string made up of two space characters)?

Note:
Your branch is one commit behind the upstream repo (CYF's main). If you use the "Sync fork" feature on your repo on GitHub to update your branch, you will find in the README.md of this exercise a regular expression that can be used to enforce "name contains at least two non-space characters".

Comment thread Form-Controls/index.html Outdated
<legend>Choose a colour</legend>

<label for="red">Red</label>
<input type="radio" id="red" name="colour" value="red" required>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could consider enclosing <input> within <label> as:

            <label>Red
              <input type="radio" name="colour" value="red" required>
            </label>

This way, you don't have to introduce id to every radio button.

Comment thread Form-Controls/index.html Outdated
Comment on lines 77 to 79
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feel free to delete any unnecessary code to keep your code base clean.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi cjyuan,

Thank you for the feedback. I have now:

  • Added the suggested regex pattern=".*\S.*\S.*" to ensure the name contains at least two non-space characters.

  • Updated the colour radio buttons to wrap the inputs inside their labels as suggested.

  • The changes have been committed and pushed to this PR. I'd appreciate another review when you have time.

Thanks!

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 28, 2026
@AbidAkhtar-tech
Copy link
Copy Markdown
Author

Thank You for the feedback! I will fix the typo.

@AbidAkhtar-tech AbidAkhtar-tech added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. 🏕 Priority Mandatory This work is expected and removed Reviewed Volunteer to add when completing a review with trainee action still to take. 🏕 Priority Mandatory This work is expected labels May 31, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Changes look good.

If you haven't yet enabled "Format on save" on VS Code, consider following this guide to enable VS Code's "Format on Save" option or to use its "Format Document" command to ensure your code is always consistently formatted.

Comment thread Form-Controls/index.html
Comment on lines +38 to +41
<label>
Red
<input type="radio" name="colour" value="red" required>
</label>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Have you wondered whether the text should appear on the left or on the right of the radio button?

Do use an AI tool to research the advantages and disadvantages of placing radio buttons on the left versus the right of their corresponding labels.

No change required.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants