Apply the canonical Riksdagsmonitor brand-suffix rule to a <title> string.
The brand suffix โ Riksdagsmonitor (18 chars) is appended only when all three conditions hold:
The title does not already contain "Riksdagsmonitor" (case-insensitive) โ avoids the literal โฆ โ Riksdagsmonitor โ Riksdagsmonitor double-brand bug.
The title does not end with the ellipsis character โฆ โ buildSeoTitle() only emits a trailing โฆ when it already truncated at the per-language SERP hardMax. Appending the brand to a truncated title would re-overshoot the budget and ship <title> like "Sweden Passes AI Facial Recognition Law as Riksdag Advances Fiveโฆ โ Riksdagsmonitor" (84 chars, > Google's 70-char EN cap). Pre-2026-05-24 audit Test Article Headers run #26364730339 reported 145/202 EN titles overshooting because of this regression.
title.length + BRAND_TITLE_SUFFIX.length โค titleWindowForLanguage(lang).hardMax โ the suffix fits inside the per-language Google SERP budget defined in serp-budgets.ts.
When any condition fails the original title is returned unchanged โ the SERP signal of the story text always outranks the brand suffix (the brand is also surfaced through og:site_name, the canonical URL, and the JSON-LD publisher node, so dropping the suffix never costs brand SEO).
The lang parameter defaults to 'en' for backwards compatibility with the small number of internal callers that don't yet thread a locale through; all production article-render call sites pass the article's actual language.
Exported so that article-head-metadata.ts (which must report the exact branded title that renderChromeHead emits) can reuse the same rule without duplicating it.
Apply the canonical Riksdagsmonitor brand-suffix rule to a
<title>string.The brand suffix
โ Riksdagsmonitor(18 chars) is appended only when all three conditions hold:โฆ โ Riksdagsmonitor โ Riksdagsmonitordouble-brand bug.โฆโbuildSeoTitle()only emits a trailingโฆwhen it already truncated at the per-language SERPhardMax. Appending the brand to a truncated title would re-overshoot the budget and ship<title>like"Sweden Passes AI Facial Recognition Law as Riksdag Advances Fiveโฆ โ Riksdagsmonitor"(84 chars, > Google's 70-char EN cap). Pre-2026-05-24 auditTest Article Headersrun #26364730339 reported 145/202 EN titles overshooting because of this regression.title.length + BRAND_TITLE_SUFFIX.length โค titleWindowForLanguage(lang).hardMaxโ the suffix fits inside the per-language Google SERP budget defined inserp-budgets.ts.When any condition fails the original
titleis returned unchanged โ the SERP signal of the story text always outranks the brand suffix (the brand is also surfaced throughog:site_name, the canonical URL, and the JSON-LDpublishernode, so dropping the suffix never costs brand SEO).The
langparameter defaults to'en'for backwards compatibility with the small number of internal callers that don't yet thread a locale through; all production article-render call sites pass the article's actual language.Exported so that
article-head-metadata.ts(which must report the exact branded title thatrenderChromeHeademits) can reuse the same rule without duplicating it.