The structure of the modal dialog component

There are two modal dialogs on the search results page:

  1. The “Help DuckDuckGo Improve Searches Like This” dialog, which can be opened from the “Report Ad,” “Are these links helpful,” and “Share Feedback” buttons on the page. These buttons activate the same form in this modal dialog, with different preset values.
  2. The “Custom date range” dialog, which can be opened from the date range setting popover.

The “Help DuckDuckGo…” dialogs and their triggers

The “Help DuckDuckGo…” dialogs and their triggers

The custom date range dialog and its trigger

The custom date range dialog and its trigger

In the next chapter, we will examine the contents of these modal dialogs, but first, let's explore the correct and accessible design pattern and identify any necessary fixes.

The accessible design pattern for modal dialogs

Keyboard interaction and focus management

Markup for the dialog

The markup for the dialog should include the following elements: