Prompt: Flight Booking System Interface (FPC009)
Model: Groq-Llama3.3-70b | Date: 07/16/2025 | Page Title: Flight Booking System
Prompt Description
Design the UI for a flight booking system's main search and results page. This is a highly interactive and complex interface.
**Page Components & Flow:**
1. **Search Form (`data-testid='flight-search-form'`):**
* Inputs: 'From' (Origin airport - text input with autocomplete suggestions, simulated), 'To' (Destination airport - text input with autocomplete, simulated), 'Departure Date' (date picker), 'Return Date' (date picker, disabled/hidden for one-way), 'Passengers' (number input).
* Options: 'One-way' / 'Round-trip' (radio buttons, affects Return Date visibility/state).
* 'Search Flights' button (`data-testid='search-flights-btn'`).
2. **Search Results Area (`data-testid='flight-results-area'`):**
* Initially empty or shows a 'Search for flights to see results' message.
* After search (simulated - generate 5-10 fake flight results): Display results as cards or rows. Each result shows: Airline Logo & Name, Departure/Arrival Times, Duration, Price, 'Select Flight' button.
* Each flight result item should be `data-testid='flight-result-item-N'`.
3. **Filtering & Sorting Options for Results:**
* Filters (applied client-side to simulated results): Price Range (slider or min/max inputs), Number of Stops (checkboxes: Non-stop, 1 stop, 2+ stops), Airlines (multi-select checkboxes).
* Filter controls container: `data-testid='results-filters'`.
* Sorting: Sort results by Price (low-high, high-low), Duration (shortest first). Sort controls container: `data-testid='results-sort-controls'`.
4. **Selected Flight Summary (Optional):** A small sidebar or section showing details of a selected flight before proceeding to booking.
**Technical & Accessibility Requirements:**
* Full semantic page structure.
* **Date Pickers:** Must be accessible and keyboard navigable. If using a library, ensure it's reputable for A11y. If custom, implement ARIA grid pattern for calendar.
* **Autocomplete (Simulated):** As user types in Origin/Destination, show a dropdown list of matching airport suggestions (use a static JS array of 5-10 airport names for simulation). Must be keyboard navigable (arrows to select, Enter to confirm). Autocomplete list: `data-testid='autocomplete-suggestions'`.
* Dynamic updates: Toggling One-way/Round-trip changes form. Applying filters/sorts updates results instantly.
* All interactive elements need proper ARIA attributes and focus management.
* Responsive: Search form, results, and filters must be usable on mobile.
* Styling: Tailwind. Significant custom JS for interactions, date pickers (if custom), autocomplete, filtering/sorting logic, and dynamic result rendering.
**Testing Identifiers:**
* Search Form: `data-testid='flight-search-form'`
* Origin Input: `data-testid='input-origin'`
* Destination Input: `data-testid='input-destination'`
* Departure Date Input: `data-testid='input-departure-date'`
* Search Flights Button: `data-testid='search-flights-btn'`
* Flight Results Area: `data-testid='flight-results-area'`
* A Flight Result Item: `data-testid='flight-result-item-1'`
* Results Filters Container: `data-testid='results-filters'`
* Price Filter (example): `data-testid='filter-price-min'`
* Results Sort Controls: `data-testid='results-sort-controls'`
* Sort by Price Button: `data-testid='sort-by-price'`
Key Links & Info
Analysis Timestamp: 07/16/2025 17:52:35
Scores for this Prompt
Technical Quality
44.0 / 110.0
(40.00%)
Prompt Adherence
20.0 / 26.0
(76.92%)
Overall Weighted
65.85 %
Technical Quality Breakdown
HTML Structure & Semantics (6.0 / 10.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| HTML Lang | PASS |
PASS
|
1.0 / 1.0 | desktop |
| Page Title | PASS |
PASS
|
1.0 / 1.0 | desktop |
| Main Tag | PASS |
PASS
|
1.0 / 1.0 | desktop |
| Nav Tag | WARN |
No visible <nav>.
|
0.0 / 1.0 | desktop |
| Footer Tag | WARN |
No visible <footer>.
|
0.0 / 1.0 | desktop |
| H1 Count | PASS |
PASS
|
1.0 / 1.0 | desktop |
| Heading Order Logic | PASS |
PASS
|
1.0 / 1.0 | desktop |
| Image Alts | INFO |
No visible images (INFO).
|
1.0 / 1.0 | desktop |
| Form Labels | FAIL |
1 inputs unlabeled.
{
"unlabeled_count": 1
}
|
0.0 / 2.0 | desktop |
CSS Quality (2.0 / 5.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| CSS Variables | WARN |
No :root CSS variables.
|
0.0 / 2.0 | desktop |
| Modern Layout Body/Main | INFO |
Flex/Grid not on body/main.
|
0.0 / 1.0 | desktop |
| Inline Styles | PASS |
Minimal inline styles.
|
1.0 / 1.0 | desktop |
| !important Usage | PASS |
No !important in <style> tags.
|
1.0 / 1.0 | desktop |
JavaScript Health (5.0 / 5.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| JS Console Errors | PASS |
No significant JS errors.
|
5.0 / 5.0 | desktop |
Accessibility (Axe-core) (0.0 / 40.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| Axe Violations | FAIL |
3 Axe violations (Crit:2,Ser:1,Mod:0,Min:0). Report: axe_report_FPC009_Flight_Booking_System_Interface_desktop.json
[
{
"help": "Elements must have sufficient color contrast",
"id": "color-contrast",
"impact": "serious"
},
{
"help": "Form elements must have labels",
"id": "label",
"impact": "critical"
},
{
"help": "Radio inputs with the same name attribute value must be part of a group",
"id": "radiogroup",
"impact": "critical"
}
]
|
0.0 / 20.0 | desktop |
| Axe Violations | FAIL |
3 Axe violations (Crit:2,Ser:1,Mod:0,Min:0). Report: axe_report_FPC009_Flight_Booking_System_Interface_mobile.json
[
{
"help": "Elements must have sufficient color contrast",
"id": "color-contrast",
"impact": "serious"
},
{
"help": "Form elements must have labels",
"id": "label",
"impact": "critical"
},
{
"help": "Radio inputs with the same name attribute value must be part of a group",
"id": "radiogroup",
"impact": "critical"
}
]
|
0.0 / 20.0 | mobile |
Rendered Color & Contrast (15.0 / 30.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| Contrast Suboptimal (AAA) | INFO |
AAA WARN 3.68 for 'Flight Booking System' in <h1 class='text-3xl font-bold'>
{
"ratio": 3.6779011537825332
}
|
0.0 / 0.0 | desktop |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Search Flights' in <button data-testid='search-flights-btn' class='mt-4 py-2 px-4 bg-blue-500 tex...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Search Flights"
}
|
0.0 / 0.0 | desktop |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Price' in <button data-testid='sort-by-price' class='py-2 px-4 bg-blue-500 text-whi...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Price"
}
|
0.0 / 0.0 | desktop |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Duration' in <button class='py-2 px-4 bg-blue-500 text-whi...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Duration"
}
|
0.0 / 0.0 | desktop |
| Contrast Check Result | FAIL |
3 WCAG AA failures on 21 instances.
|
7.5 / 15.0 | desktop |
| Contrast Suboptimal (AAA) | INFO |
AAA WARN 3.68 for 'Flight Booking System' in <h1 class='text-3xl font-bold'>
{
"ratio": 3.6779011537825332
}
|
0.0 / 0.0 | mobile |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Search Flights' in <button data-testid='search-flights-btn' class='mt-4 py-2 px-4 bg-blue-500 tex...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Search Flights"
}
|
0.0 / 0.0 | mobile |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Price' in <button data-testid='sort-by-price' class='py-2 px-4 bg-blue-500 text-whi...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Price"
}
|
0.0 / 0.0 | mobile |
| Contrast Failure (AA) | FAIL |
AA FAIL 3.68 for 'Duration' in <button class='py-2 px-4 bg-blue-500 text-whi...'>
{
"bg_eff": "rgb(59, 130, 246)",
"fg": "rgb(255, 255, 255)",
"ratio": 3.6779011537825332,
"text": "Duration"
}
|
0.0 / 0.0 | mobile |
| Contrast Check Result | FAIL |
3 WCAG AA failures on 21 instances.
|
7.5 / 15.0 | mobile |
Responsiveness (Viewport & Scroll) (16.0 / 20.0)
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| Viewport Meta Tag | PASS |
Configured correctly for responsiveness.
|
4.0 / 4.0 | desktop |
| Horizontal Scrollbar | PASS |
No horizontal scrollbar detected.
|
6.0 / 6.0 | desktop |
| Viewport Meta Tag | INFO |
Already scored for this prompt.
|
0.0 / 0.0 | mobile |
| Horizontal Scrollbar | PASS |
No horizontal scrollbar detected.
|
6.0 / 6.0 | mobile |
Prompt Adherence Breakdown
| Check | Status | Message & Data | Points | Viewport |
|---|---|---|---|---|
| Flight Search Form | PASS |
Element 'form[data-testid='flight-search-form']' present and visible.
Selector:
form[data-testid='flight-search-form'] |
2.0 / 2.0 | desktop |
| Origin Input | PASS |
Element 'input[data-testid='input-origin']' present and visible.
Selector:
input[data-testid='input-origin'] |
1.0 / 1.0 | desktop |
| Destination Input | PASS |
Element 'input[data-testid='input-destination']' present and visible.
Selector:
input[data-testid='input-destination'] |
1.0 / 1.0 | desktop |
| Departure Date Input | PASS |
Element '[data-testid='input-departure-date']' present and visible.
Selector:
[data-testid='input-departure-date'] |
1.0 / 1.0 | desktop |
| Search Flights Button | PASS |
Element 'button[data-testid='search-flights-btn']' present and visible.
Selector:
button[data-testid='search-flights-btn'] |
1.0 / 1.0 | desktop |
| Flight Results Area | PASS |
Element '[data-testid='flight-results-area']' present and visible.
Selector:
[data-testid='flight-results-area'] |
1.0 / 1.0 | desktop |
| Results Filters Container | PASS |
Element '[data-testid='results-filters']' present and visible.
Selector:
[data-testid='results-filters'] |
1.0 / 1.0 | desktop |
| Results Sort Controls Container | PASS |
Element '[data-testid='results-sort-controls']' present and visible.
Selector:
[data-testid='results-sort-controls'] |
1.0 / 1.0 | desktop |
| Simulate Search and Display Results | PASS |
All interaction steps/outcomes verified.
|
6.0 / 6.0 | desktop |
| Autocomplete Suggestion Appears for Origin | PASS |
All interaction steps/outcomes verified.
|
5.0 / 5.0 | desktop |
| Date Picker is Accessible (basic check for ARIA attributes) | FAIL |
Custom script evaluation result: False (expected true).
Script Eval: False
|
0.0 / 3.0 | desktop |
| Round-trip Toggle Affects Return Date | FAIL |
Custom script evaluation result: False (expected true).
Script Eval: False
|
0.0 / 3.0 | desktop |
| Flight Search Form | PASS |
(Points already awarded) Element 'form[data-testid='flight-search-form']' present and visible.
Selector:
form[data-testid='flight-search-form'] |
0.0 / 2.0 | mobile |
| Origin Input | PASS |
(Points already awarded) Element 'input[data-testid='input-origin']' present and visible.
Selector:
input[data-testid='input-origin'] |
0.0 / 1.0 | mobile |
| Destination Input | PASS |
(Points already awarded) Element 'input[data-testid='input-destination']' present and visible.
Selector:
input[data-testid='input-destination'] |
0.0 / 1.0 | mobile |
| Departure Date Input | PASS |
(Points already awarded) Element '[data-testid='input-departure-date']' present and visible.
Selector:
[data-testid='input-departure-date'] |
0.0 / 1.0 | mobile |
| Search Flights Button | PASS |
(Points already awarded) Element 'button[data-testid='search-flights-btn']' present and visible.
Selector:
button[data-testid='search-flights-btn'] |
0.0 / 1.0 | mobile |
| Flight Results Area | PASS |
(Points already awarded) Element '[data-testid='flight-results-area']' present and visible.
Selector:
[data-testid='flight-results-area'] |
0.0 / 1.0 | mobile |
| Results Filters Container | PASS |
(Points already awarded) Element '[data-testid='results-filters']' present and visible.
Selector:
[data-testid='results-filters'] |
0.0 / 1.0 | mobile |
| Results Sort Controls Container | PASS |
(Points already awarded) Element '[data-testid='results-sort-controls']' present and visible.
Selector:
[data-testid='results-sort-controls'] |
0.0 / 1.0 | mobile |
| Simulate Search and Display Results | PASS |
(Points already awarded) All interaction steps/outcomes verified.
|
0.0 / 6.0 | mobile |
| Autocomplete Suggestion Appears for Origin | PASS |
(Points already awarded) All interaction steps/outcomes verified.
|
0.0 / 5.0 | mobile |
| Date Picker is Accessible (basic check for ARIA attributes) | FAIL |
Custom script evaluation result: False (expected true).
Script Eval: False
|
0.0 / 3.0 | mobile |
| Round-trip Toggle Affects Return Date | FAIL |
Custom script evaluation result: False (expected true).
Script Eval: False
|
0.0 / 3.0 | mobile |