# Business Rules — frontend-shell Rule IDs are referenced by the code generation plan and the tests. "Q" = [frontend-shell-fd-questions.md](../../plans/frontend-shell-fd-questions.md), "CQ" = [frontend-shell-fd-clarification-questions.md](../../plans/frontend-shell-fd-clarification-questions.md). ## Back-to-top button | ID | Rule | Source | |---|---|---| | BR-TOP-01 | Threshold = `backToTopThreshold(viewportHeight)` = `0.6 × max(0, viewportHeight)`. Non-finite input counts as 0. | FR-06 | | BR-TOP-02 | Visible when `scrollY > threshold` (strictly greater), otherwise hidden. Evaluated on mount and on every (passive) scroll event via `useScrolledPast`. | FR-06 | | BR-TOP-03 | Hidden means `visibility: hidden`: not focusable, not in the accessibility tree, not clickable. | FR-06 | | BR-TOP-04 | Show/hide animation: fade + 8px upward slide with the `interaction` duration and `smooth` easing. Under `prefers-reduced-motion: reduce`: instant, no transition. | Q3 = A | | BR-TOP-05 | Click: scroll to the top, `smooth`, or `instant` under reduced motion. | FR-06 | | BR-TOP-06 | After the click, focus moves to `main#main` with `preventScroll`, so the smooth scroll is not interrupted. `main` shows no focus ring for programmatic focus. | Q2 = A | | BR-TOP-07 | Appearance: `ink` background, white `up-outlined` icon, no border, square, 46×46px. Hover/focus-visible: background `accent.deep`. Focus-visible also shows a focus ring. | CQ1 = A, Q4 = A | | BR-TOP-08 | Position: fixed at the bottom right. The right offset is the design offset (`clamp(1rem, 3vw, 2rem)`), but on viewports wider than the `Container` max width it aligns with the container's right edge instead of the screen corner. | CQ2 = A | | BR-TOP-09 | Stacking: below the header and the mobile menu. | FR-06 | ## Hero slides | ID | Rule | Source | |---|---|---| | BR-HERO-01 | Only the active slide loads first. Once it has loaded and been painted, `slidesToLoad(active, count)` decides which slides are mounted: the active one, the next and the previous, wrapping around (from the first slide the previous is the last). Slides further away load when the slider gets near them. | Code change Q3 = A | ## Social links | ID | Rule | Source | |---|---|---| | BR-SOC-01 | `visibleSocials(socials)` keeps a link only when `href` parses as a URL with protocol `https:`. Empty, `http:`, `javascript:`, relative or unparseable values are dropped. | Q5 = A | | BR-SOC-02 | Order is preserved; no entries are added or changed. | — | | BR-SOC-03 | Hero and Footer both use `visibleSocials`; the Hero shows icons, the Footer shows platform names. | FR-04, AD D11 | | BR-SOC-04 | External links open in a new tab with `rel="noopener noreferrer"`. | NFR-04 | ## E-mail address | ID | Rule | Source | |---|---|---| | BR-EMAIL-01 | The address is stored as `{ user, domain }` and joined in the browser by `emailAddress(parts)` at render time. The complete address is never a literal in source, bundle or content data. | CQ3 = A | | BR-EMAIL-02 | `emailAddress` returns `null` when the parts are invalid: either part empty, containing whitespace or `@`, or a domain without a `.`. Otherwise it returns `user@domain`. | CQ3 = A | | BR-EMAIL-03 | The Footer shows the joined address as link text with `href="mailto:
"`, as in the design. | CQ3 = A | ## Footer | ID | Rule | Source | |---|---|---| | BR-FOOT-01 | A column with nothing to show is omitted entirely (heading included): Socials when `visibleSocials` is empty, Contact when `emailAddress` is `null`. The grid closes up. | Q6 = A | | BR-FOOT-02 | Copyright: `copyrightLine(year)` = `"© {year} Andrea Slop Fotografie"`, with `year = new Date().getFullYear()` at render. | FR-05 | | BR-FOOT-03 | Footer menu links get `aria-current="page"` when active (router default), with **no** visual difference. | Q7 = B | | BR-FOOT-04 | Link colours: `ink.soft`, hover/focus `accent.deep` (`link` variant `subtle`). Column headings and bottom bar use `ink.soft`. | NFR-01 | ## Navigation | ID | Rule | Source | |---|---|---| | BR-NAV-01 | `mainNav` and `footerNav` each contain no duplicate `to`. | — | | BR-NAV-02 | `mainNav` starts with Home `/` and does not contain `/privacyverklaring`. | FR-02 | | BR-NAV-03 | Every `to` in both menus is a registered route (type-checked). | AD D4 | ## Not-found page | ID | Rule | Source | |---|---|---| | BR-404-01 | Any URL without a matching route renders `NotFound` inside the shell (root `notFoundComponent`). | FR-09 | | BR-404-02 | `NotFound` renders its own `