# Contrast audit: Site pages (modernisation idea 4)

Role: Site. Date: 2026-11-17. Pages: home, about, contact, request-demo, talk-to-sales, privacy-policy, terms-condition, plus the shared header, footer, pre-footer, phone bar, phone menu and cookie notice that every page carries. Products appends or keeps its own section for the product pages and pricing.

## Method

`php scripts/qa/contrast.php <width> <paths...> [--menu]` (headless Chrome through `scripts/qa/lib/cdp.php`, run against the dev server on port 8101):

1. Load the page at the width, scroll through it (reveal animations, lazy images), stop animations.
2. Record every visible text run: computed colour (with alpha), font size, weight and the box of the text itself. Screen-reader-only text is skipped.
3. Make all text transparent and capture the page again (full page; fixed elements such as the cookie notice and phone bar from the viewport capture).
4. For each run, sample 80 points of the real rendered background under the text box, blend the text colour over each sample, compute the WCAG ratio, and take the 10th percentile (so photos, gradients and overlays are measured, not assumed).
5. Requirement: 4.5:1, or 3:1 for large text (24px and up, or 18.66px and up at weight 700).

The cookie notice is open during the run (fresh browser profile); `--menu` opens the phone menu and audits only its contents.

## Result (final run, after the fixes below)

| Page | 1440: runs / failures / lowest | 1024 | 390 |
|---|---|---|---|
| / | 89 / 0 / 3.02 (large) | 88 / 0 / 3.02 | 72 / 0 / 3.02 |
| /about/ | 52 / 0 / 3.02 (large) | 51 / 0 / 3.02 | 48 / 0 / 3.02 |
| /contact/ | 66 / 0 / 4.69 | 65 / 0 / 4.69 | 62 / 0 / 4.69 |
| /request-demo/ | 51 / 0 / 4.69 | 50 / 0 / 4.69 | 47 / 0 / 4.69 |
| /talk-to-sales/ | 47 / 0 / 4.69 | 46 / 0 / 4.69 | 43 / 0 / 4.69 |
| /privacy-policy/ | 152 / 0 / 3.02 (large) | 151 / 0 / 3.02 | 148 / 0 / 3.02 |
| /terms-condition/ | 93 / 0 / 3.02 (large) | 92 / 0 / 3.02 | 89 / 0 / 3.02 |
| Phone menu (open, 390) | | | 13 / 0 / 9.80 |

**0 failures.** The lowest values (3.02) are large teal headings on white (e.g. "Your success is our priority", "Talk to Sales", "Last Updated" on the legal pages), which need 3:1. Every normal-size text run is at 4.69:1 or more.

Not covered by the script: hover colours (checked by hand for the changed buttons), text inside the idealers.app form iframes (third-party, and blocked outside idealers.net anyway), text drawn inside images.

## Fixes (all through tokens in `resources/css/site/tokens.css` where the colour is shared)

| Pair (before) | Ratio before | Fix | After |
|---|---|---|---|
| Body grey `#7a7a7a` on white (`--color-text`) | 4.3 | `--color-text: #666666` | 5.74 |
| Light greys `#939393`, `#969696`, `#8d8d8d`, `rgba(0,0,0,.52)` on white (sales card text, contact text and list, mission text, home intro subtitle) | 3.1 to 4.3 | use `--color-text` | 5.74 |
| White on teal `#00a795` (primary button, pre-footer button, "our features", dropdown hover) | 3.02 | new `--color-button-bg` = dark green `#006056` | 7.48 |
| Primary button gradient teal to gold `#feba19` | 3.02 to 1.71 | solid `--color-button-bg` (as in the approved sample) | 7.48 |
| "Talk to Sales" button gradient teal to violet `#d019fe` | 3.02 / 4.0 | gradient `--color-button-bg` to `--color-violet-dark` `#8b10aa` | 7.48 / 7.63 |
| White on red `#e24a59` (header "Request A Demo") | 3.92 | `--color-red-fill: #c8323f` (darker shade of the same red) | 5.27 |
| Teal text, normal size, on white or light grey (contact headings, outline button, light button, info-box link, "OUR PRIORITY." on `#f3f3f3`, "iDealers" highlight on the `#fafafa` about card) | 2.72 to 3.02 | `--color-on-light-accent` = `#006056` | 6.74 or more |
| Footer links and copyright, `rgba(255,255,255,.5)` 13-14px weight 300 on the footer image | measured lower over the lighter parts of the image | `--color-footer-link: rgba(255,255,255,.78)`, weight 400, 14px | passes (measured) |
| "01" on the active process step (`#00c9b3` to `#007d70` gradient) | 2.1 at the top | gradient `--color-primary` to `--color-primary-dark` | 3.02 or more (24px bold) |
| Clients subtitle `#b7b7b7` over the photo | 4.28 (measured over the photo) | `#d2d2d2` | passes (measured) |
| Cookie notice: grey `#00a99d` button with white text on `rgb(50,50,58)` | 2.93 (button) | new notice (white card, dark text, dark-green Accept) | 7.48 or more |

Layout fixes needed for contrast (tablet, 768 to 1024px; desktop and phones unchanged):

- Home intro: the original's text column ran over the dark laptop picture (1.2 to 1.8:1). The text column is now 40% wide there and ends before the picture; the video column keeps its width and position.
- About: the original placed the woman/logo image over the body text at tablet width (2.6:1). It now sits right of the text column (`right: 30px` instead of `left: 484px`).

## Other idea 4 items on these pages

- Headings: one `h1` per page, no skipped levels (checked in headless Chrome on all seven pages). Changed tags only: home process steps `h6` to `h3`, footer column titles `h4` to `h2` (all pages), request-demo "CALL US" / "BY EMAIL" `h3` to `h2`. Sizes come from classes, so nothing moved.
- Focus: two-tone ring (`--color-focus` dark green outside, white inside) on every interactive element, visible on light and dark backgrounds; skip link restyled; the phone menu uses a white ring on its dark panel. Reduced motion still disables animations (menu slide, bar, cookie notice included).
- Alt texts: see `docs/review/alt-texts.md`.

---

# Contrast audit: product pages and Pricing (Products role)

Role: Products. Date: 2026-11-17. Pages: /idms-idealers-management-system/, /inventory-management/, /leads-center/, /website/, /marketing-tools/, /crm-system/, /design-studio-tool/, /pricing/ (with the new comparison table, FAQ and Talk to Sales strip).

## Method

The same script as above, run against the Products server: `MSYS_NO_PATHCONV=1 QA_BASE=http://127.0.0.1:8102 php scripts/qa/contrast.php <width> <paths...>` at 1440, 1024 and 390. Cross-checked with a second pass (scratch script, same principle: text made transparent through CDP with CSP bypassed for the test only, each text box scrolled into view and the real pixels under it sampled, 10th percentile reported) and by eye on screenshots for the cases the scripts cannot measure (listed below).

## Result (final run)

| Page | 1440: runs / failures / lowest | 1024 | 390 |
|---|---|---|---|
| /idms-idealers-management-system/ | 76 / 0 / 3.23 (large) | 75 / 0 / 3.23 | 72 / 0 / 3.23 |
| /inventory-management/ | 60 / 0 / 3.59 (large) | 59 / 0 / 3.59 | 56 / 0 / 3.59 |
| /leads-center/ | 55 / 0 / 3.78 (large) | 54 / 0 / 3.78 | 51 / 0 / 3.78 |
| /website/ | 65 / 0 / 3.21 (large) | 64 / 0 / 3.21 | 61 / 0 / 3.21 |
| /marketing-tools/ | 75 / 0 / 3.21 (large) | 74 / 0 / 3.21 | 71 / 0 / 3.21 |
| /crm-system/ | 57 / 0 / 3.22 (large) | 56 / 0 / 3.22 | 53 / 0 / 3.22 |
| /design-studio-tool/ | 148 / 0 real (10 reported, see below) | 146 / 0 real (10) | 137 / 0 real (11) |
| /pricing/ | 143 / 0 real (1 reported) | 142 / 0 real (1) | 133 / 0 real (2) |

**0 real failures.** The lowest values are large headings in the darkened highlight colours (3:1 needed). The lines the script still prints on two pages are measurement artefacts, each checked by hand:

- Design Studio, 9 headings with `rgba(..., 0)` colour: gradient text (`background-clip: text`), which the script reads as fully transparent. Measured from the gradient stops instead: every stop is 4.7:1 or more on the black section background (the navy start `#051937`/`#004d7a`, 1.2 to 2.3:1, was replaced, see fixes), and the heading on the dark teal top of the testimonials section uses only the light stops (4.3:1 or more).
- "Popular" ribbon (Design Studio and Pricing): the text is rotated 45 degrees, so its bounding box covers white card outside the ribbon triangle. Inside the triangle: white on `#6d4373` 7.8:1 to `#55789c` 4.6:1.
- Pricing FAQ answer: the answer is inside a closed `<details>`; the script measures its box over the strip below. Opened, it is `#3f524f` on white, 8.6:1.
- 390 px, comparison table header cells ("Premium", "Designer"): cells scrolled out of the table's own scroll box are sampled over whatever lies outside it. In place: white on `#006056` 7.5:1, `#12201e` on `#e8f0ee` 14:1.

Not covered: hover colours (checked by hand: Design Studio button hover text uses the same dark green), text inside screenshots and illustrations.

## Fixes (tokens; product tokens are defined once on `.p-page` in `resources/css/products/base.css`)

| Pair (before) | Ratio before | Fix | After |
|---|---|---|---|
| Body greys `#aeaeae`, `#a4a4a4`, `#ababab`, `#939393`, `#888`, `#828282`, `#a8a8a8`, `#b0b0b0`, `#bcbcbc`, `#a6a6a6`, `#aaa`, `#7b7b7b` on white / `#f9f9f9` (section text, pricing features and "/ Per Month", Design Studio "Per Month" and crossed-out prices, IDMS check list) | 1.8 to 4.2 | `var(--color-text)` (`#666`) | 5.4 to 5.7 |
| Yellow highlight `#fec94e` (IDMS, Inventory, Marketing headings) | 1.5 | `--p-accent-gold: #aa8634` | 3.2 (large) |
| Teal highlight `#63b6b0` (Website, Marketing headings; not on the dark "Awesome features" band, where it passes) | 2.3 | `--p-accent-teal: #529792` | 3.2 (large) |
| Orange highlight `#ff7955` (CRM headings) | 2.5 | `--p-accent-orange: #dd6949`; 20px hero sub heading `--p-accent-orange-text: #b5553c` | 3.2 (large) / 4.6 |
| Pricing red `#d95754` (Premium card fill under white text, "Get Started" red text, "/ Per Month" on the card, hero "of our works" and "100%") | 3.9 (2.6 on the hero) | `var(--color-red-fill)` (`#c8323f`); on the deeper hero pastel of tablets and phones `--p-accent-red-deep: #a52a35` | 4.9 / 3.4 or more |
| "All in Starter Plan" inline content colour `#d95754` | 3.9 | CSS maps that exact inline colour to `--color-red-fill` (content untouched) | 4.9 |
| Pricing hero: white "We are proud", white "Customer Satisfaction", grey intro on the pale lavender/pink card | 1.4 to 2.6 | `--color-secondary` / `--color-ink-soft` | 5 or more |
| Pricing hero at 1024: counter label over the purple globe illustration | 1.3 | counter raised above the illustration on a light backing (tablet only) | 5 or more |
| Design Studio buttons, white on `#079ba5` (Subscribe Now x2, Order Now x3) | 3.4 | fill and border `var(--color-button-bg)` | 7.5 |
| IDMS "Watch Video" / "Learn More", white on gold-to-pink gradient | 2.7 | `--p-cta-gold: #907027`, `--p-cta-pink: #dd285b` | 4.6 |
| Popular ribbon, white on `#6d4373` to `#7caee3` (SVG background) | 2.3 at the light end | same triangle drawn with `linear-gradient` + `clip-path`, light end `--p-ribbon-end: #55789c` | 4.6 |
| Website "iDealers Live Chat Tools" band: `#565656` highlight and `#ededed` text on teal `#63b6b0` to `#00736b` | 2.1 / 3.0 | band fill dark green (`--color-primary-dark` to `#00463f`), highlight `--color-primary-light` | 3.9 (large) / 7 or more |
| Hero intro lines on Inventory, Leads, Website, Marketing, CRM over the coloured diagonal of the hero image | 1.8 to 3.0 | `var(--color-ink)`; Marketing (near-black diagonal) also wraps before the shape (max-width 460px from 768px up); on tablets and phones the hero image is fitted to the width at the bottom of the section, behind the device | 5 or more |
| Design Studio gradient headings starting with navy `#051937`, `#004d7a` on black | 1.2 / 2.3 | start stops `#1a8ac0`, `#0e8fb0`; testimonials heading light stops only | 4.7 or more |

## Other idea 4 items on these pages

- Headings: one `h1` per page and no skipped levels on all eight pages (checked in headless Chrome). Changed tags only: Design Studio "Studio Design" `h1` to `h2`; Pricing "of our works" `h3` to `h2`; empty hidden `h2` on Marketing Tools to `p`. New: `h2` "Not sure which plan fits?" on Pricing and Design Studio.
- Focus: the product-only 2px `currentColor` outlines (invisible on white buttons) are removed, so buttons, carousel and plan links use the site-wide two-tone ring; the comparison table scroll box, FAQ summaries and the Talk to Sales button have their own visible rings. Tabbing through all eight pages: every focus stop in the page content shows a ring (scratch test `focus.php`).
- Carousel (Design Studio testimonials): ArrowRight on the focused slide area and Enter on the Next button both move the slide (keyboard test passed); autoplay pauses on focus as before.
- Alt texts: see `docs/review/alt-texts.md`, section "Product pages and pricing".
