Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Forms and Accessibility in HTML and CSS (Summary)

You’ve finished the course. In this course, you learned how to:

  • Build a form with a label for every field and input types that fit the data
  • Let the browser check what visitors type, and style the form and its errors to match the site
  • Check a page with the keyboard, the Accessibility pane, Lighthouse, and a screen reader
  • Build and audit Rosa’s plot application form

The Form You Built

Every field in the form you built for Rosa has a visible label and a type that fits its data. When Nadia Haddad fills in everything but the rules box and presses Apply for a plot, Chrome won’t send the form and says Please check this box if you want to proceed. Once she ticks the box, the browser goes to the thanks page with every name and value the form sent, with lines wrapped for display:

Language: Text
applied.html?name=Nadia+Haddad&email=nadia%40example.com
&phone=555+0199&size=half&day=saturday
&experience=Herbs+and+tomatoes+on+my+balcony
&rules=agreed

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

00:00 Here’s what you learned to do.

00:03 Build a form with a label for every field and input types that fit the data. Let the browser check what visitors type, and style the form and its errors to match the site.

00:13 Check a page with the keyboard, the Accessibility pane, Lighthouse, and a screen reader. And build and audit Rosa’s plot application form.

00:25 Every field in Rosa’s form has a label and a type that fits. Nadia fills in everything but the rules box, so Chrome won’t send it. She ticks it, and the address shows each name and value sent.

00:39 On a fresh form, a bad email turns red once you’ve typed and moved on, or tried to send, with a message in words.

00:49 Then you audited the whole site. Tab moves between controls with a visible outline, and arrow keys move inside the radio group. Each field has a role and a name.

01:00 Lighthouse’s one hundred is one check of four.

01:05 Things to remember: a placeholder isn’t a label. Every button in a form needs a type, or it submits the form. Whatever receives the data must check it again.

01:18 Show errors once a visitor has changed a field or tried to send, in words as well as color. And form controls ignore the page’s font until told to inherit it.

01:31 Nothing reaches Rosa yet. That needs a server program. Sending without leaving the page, and changing Chrome’s own messages, take JavaScript. The RealJS course Forms and Controls for Everyone picks up there.

01:44 Next in this path, you’ll polish and publish the garden’s site. Thanks for watching.

Become a Member to join the conversation.