Latest Benchmark Benchmark Archive Tesslate AI

Community

Hugging Face Discord

TFrameX

Docs GitHub

Prompt: Flight Booking System Interface (FPC009)

Model: Groq-Llama4-Scout | Date: 05/17/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: 05/17/2025 11:46:10

Desktop Screenshot:

Desktop Screenshot of FPC009_Flight_Booking_System_Interface

Mobile Screenshot:

Mobile Screenshot of FPC009_Flight_Booking_System_Interface

Scores for this Prompt

Technical Quality

116.2 / 190.0

(61.16%)

Prompt Adherence

20.0 / 26.0

(76.92%)

Overall Weighted

73.77 %

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'>
{
  "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='bg-blue-500 text-white p-2 rou...'>
{
  "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 (low-high)' in <button data-testid='sort-by-price' class='bg-blue-500 text-white p-2 rou...'>
{
  "bg_eff": "rgb(59, 130, 246)",
  "fg": "rgb(255, 255, 255)",
  "ratio": 3.6779011537825332,
  "text": "Price (low-high)"
}
0.0 / 0.0 desktop
Contrast Failure (AA) FAIL
AA FAIL 3.68 for 'Duration (shortest first)' in <button class='bg-blue-500 text-white p-2 rou...'>
{
  "bg_eff": "rgb(59, 130, 246)",
  "fg": "rgb(255, 255, 255)",
  "ratio": 3.6779011537825332,
  "text": "Duration (shortest first)"
}
0.0 / 0.0 desktop
Contrast Check Result FAIL
3 WCAG AA failures on 20 instances.
7.5 / 15.0 desktop
Contrast Suboptimal (AAA) INFO
AAA WARN 3.68 for 'Flight Booking System' in <h1 class='text-3xl'>
{
  "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='bg-blue-500 text-white p-2 rou...'>
{
  "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 (low-high)' in <button data-testid='sort-by-price' class='bg-blue-500 text-white p-2 rou...'>
{
  "bg_eff": "rgb(59, 130, 246)",
  "fg": "rgb(255, 255, 255)",
  "ratio": 3.6779011537825332,
  "text": "Price (low-high)"
}
0.0 / 0.0 mobile
Contrast Failure (AA) FAIL
AA FAIL 3.68 for 'Duration (shortest first)' in <button class='bg-blue-500 text-white p-2 rou...'>
{
  "bg_eff": "rgb(59, 130, 246)",
  "fg": "rgb(255, 255, 255)",
  "ratio": 3.6779011537825332,
  "text": "Duration (shortest first)"
}
0.0 / 0.0 mobile
Contrast Check Result FAIL
3 WCAG AA failures on 20 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

Performance (Lighthouse) (37.4 / 40.0)

Check Status Message & Data Points Viewport
Lighthouse Score PASS
95/100
19.0 / 20.0 desktop
Lighthouse Score PASS
92/100
18.4 / 20.0 mobile

Accessibility (Lighthouse) (16.2 / 20.0)

Check Status Message & Data Points Viewport
Lighthouse Score WARN
81/100
8.1 / 10.0 desktop
Lighthouse Score WARN
81/100
8.1 / 10.0 mobile

Best Practices (Lighthouse) (9.6 / 10.0)

Check Status Message & Data Points Viewport
Lighthouse Score PASS
96/100
4.8 / 5.0 desktop
Lighthouse Score PASS
96/100
4.8 / 5.0 mobile

SEO (Lighthouse) (9.0 / 10.0)

Check Status Message & Data Points Viewport
Lighthouse Score PASS
90/100
4.5 / 5.0 desktop
Lighthouse Score PASS
90/100
4.5 / 5.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

Axe Accessibility Reports (JSON)