Files
AndreaSlopFotografie/aidlc-docs/features/homepage-sections/construction/lieve-woorden/functional-design/business-rules.md
T
SluijsensandClaude Opus 5.5 cb6a9b07f9 Adds the Lieve woorden section to the homepage
Shows client reviews one at a time with the framed photo, a large
quotation mark, the shoot type and the names. Uses Chakra's carousel for
paging, looping and swiping with our own controls, so visitors who
prefer reduced motion get instant changes, and loads the carousel only
when the section comes near the screen so the hero does not wait for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:52:41 +02:00

3.8 KiB

Business Rules — Unit 4: Lieve woorden

Rules

ID Rule Source
BR-REV-01 Only testimonials that meet the invariants are shown; duplicates by id keep the first; order is kept. domain-entities.md
BR-REV-02 No valid testimonial → the section is not rendered. One → it is shown without arrows, dots or carousel semantics. Two or more → carousel. FR-HP-05
BR-REV-03 One review is visible at a time; there is no autoplay. FR-HP-05, design Q2
BR-REV-04 Navigation: previous/next buttons, one dot per review, arrow keys when focus is in the carousel, and swiping (and mouse dragging) on the slides. FR-HP-05
BR-REV-05 At the ends the carousel loops: "next" on the last review goes to the first, "previous" on the first to the last. The buttons are never disabled. Q1 = A
BR-REV-06 A change slides horizontally (the slides lie side by side; a swipe follows the finger). Under prefers-reduced-motion the change is immediate, without animation. Q2 = A
BR-REV-07 Every slide has the height of the tallest one, so the page below does not move when the review changes. Q3 = A
BR-REV-08 Every manual change is announced once, politely, as "Review n van m". Nothing is announced on page load. NFR-HP-01
BR-REV-09 Each slide is labelled "Review n van m"; the buttons are "Vorige review" / "Volgende review"; each dot is "Review n", and the current dot is marked as current. NFR-HP-01
BR-REV-10 Off-screen slides are hidden from assistive technology and not focusable. NFR-HP-01
BR-REV-11 The quote is shown as a blockquote with the author as its caption; the large quotation mark is decorative and hidden from assistive technology. design

Decision flow: what is rendered (BR-REV-01/02)

graph TD
    In["Testimonials from content"] --> Filter["Keep valid, first of each id"]
    Filter --> Count{"How many remain?"}
    Count -->|"none"| Nothing["Section not rendered"]
    Count -->|"one"| Single["Single review, no controls"]
    Count -->|"two or more"| Carousel["Carousel with arrows, dots, keyboard and swipe, looping"]

    classDef input fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
    classDef decision fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
    classDef outcome fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
    class In,Filter input;
    class Count decision;
    class Nothing,Single,Carousel outcome;

Text alternative: after filtering, no testimonials means no section, one means a single review without controls, two or more means a looping carousel with arrows, dots, keyboard and swipe.

Decision flow: navigation (BR-REV-05/06/08)

graph TD
    Act["Visitor uses arrow, dot, key or swipe"] --> Target{"Past the last or before the first?"}
    Target -->|"yes"| Wrap["Wrap around to the other end"]
    Target -->|"no"| Go["Go to the chosen review"]
    Wrap --> Motion{"Prefers reduced motion?"}
    Go --> Motion
    Motion -->|"yes"| Jump["Switch immediately"]
    Motion -->|"no"| Slide["Slide horizontally"]
    Jump --> Say["Announce Review n van m once"]
    Slide --> Say

    classDef input fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
    classDef decision fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
    classDef outcome fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
    class Act input;
    class Target,Motion decision;
    class Wrap,Go,Jump,Slide,Say outcome;

Text alternative: any navigation action wraps around at the ends, then either switches immediately (reduced motion) or slides, and is announced once as "Review n van m".

Misuse considerations (SECURITY-11)

Testimonials are static content (later from the CMS) and rendered as text by React; no HTML from content is interpreted.