Skip to content
Learn Netverks

Lesson

Step 22/36 61% through track

search-dialog

Search forms and dialog

Last reviewed Jun 1, 2026 Content v20260601
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Search forms and dialog—the ideas, syntax, and habits you need before moving on in Pico CSS.

Class-light frameworks teach when semantic HTML alone should carry the design.

You will apply Search forms and dialog in contexts like: Documentation sites, blogs, internal tools, and side projects where you want polish without a large class vocabulary.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

When the previous lesson's MCQs feel easy and you can explain Search forms and dialog in your own words.

Site search uses a real <form role="search"> with type="search" inputs—Pico adds a search icon and consistent padding. Stack the field and button with role="group" on a fieldset for toolbar-style search bars.

Native dialog

For confirmations, command palettes, or “quick help,” use the semantic <dialog> element. Pico styles dialog + inner article with header, body, and footer regions. Pico does not ship modal JavaScript—you open dialogs with HTMLDialogElement.showModal() or the open attribute for static demos.

Accessibility

  • Give the dialog an accessible name via aria-labelledby pointing at the heading inside.
  • Close controls should be real button elements with aria-label="Close".
  • Return focus to the trigger when the dialog closes in production scripts.

Self-check

  1. Which input type triggers Pico’s search icon styling?
  2. What element wraps modal content in Pico’s recommended pattern?
  3. Who is responsible for opening and closing dialogs—Pico or your JS?

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • search landmark?
  • dialog focus trap?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump