MCP site tools, Turnstile key alert, required 2FA injection, a11y, more tests
- MCP: new get_site_info and list_pages tools (public by design, published
and indexable content only); search results collapse the homepage to root.
New listContent() helper shared with searchContent.
- Dashboard alert when Turnstile is half-configured (it is silently off then).
- twoFactor.plugin is now required; the dynamic-import fallback (which never
worked under Next and caused a Turbopack warning) is gone.
- a11y: cookie category checkboxes are labelled, buttons have type, test-email
input is labelled; tab labels keep localized collection labels.
- IPAL_IP_HEADER: one-time production warning when unset, opt-in
ipalEnvRules({ ipHeader: true }).
- Tests: SEO/robots/sitemap/hreflang, CSP, Markdown, consent, MCP, and a real
Payload + SQLite integration test for forms and the roles guard (74 total).
- Drop unused mongodb-memory-server; dev .env.example for SQLite.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -93,6 +93,7 @@ export function ConsentScript({
|
||||
if (asyncAttr) {el.async = true}
|
||||
if (defer) {el.defer = true}
|
||||
if (attributes) {for (const [k, v] of Object.entries(attributes)) {el.setAttribute(k, v)}}
|
||||
// eslint-disable-next-line @eslint-react/web-api/no-leaked-event-listener -- one-shot, and the script is never unloaded (see below)
|
||||
el.addEventListener('load', runInline, { once: true })
|
||||
document.head.appendChild(el)
|
||||
} else {
|
||||
|
||||
@@ -101,13 +101,13 @@ export function CookieBanner({ classNames }: { classNames?: CookieBannerClassNam
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex shrink-0 gap-2">
|
||||
<button className={secondaryClass} data-ipal="settings" onClick={() => setShowSettings(true)}>
|
||||
<button className={secondaryClass} data-ipal="settings" onClick={() => setShowSettings(true)} type="button">
|
||||
{texts.buttons.settings}
|
||||
</button>
|
||||
<button className={secondaryClass} data-ipal="reject" onClick={rejectAll}>
|
||||
<button className={secondaryClass} data-ipal="reject" onClick={rejectAll} type="button">
|
||||
{texts.buttons.reject}
|
||||
</button>
|
||||
<button className={primaryClass} data-ipal="accept" onClick={acceptAll}>
|
||||
<button className={primaryClass} data-ipal="accept" onClick={acceptAll} type="button">
|
||||
{texts.buttons.acceptAll}
|
||||
</button>
|
||||
</div>
|
||||
@@ -122,12 +122,16 @@ export function CookieBanner({ classNames }: { classNames?: CookieBannerClassNam
|
||||
{CONSENT_CATEGORIES.map((cat) => (
|
||||
<li className="flex items-start justify-between gap-4" key={cat}>
|
||||
<div>
|
||||
<p className={`text-sm font-medium ${strongText}`}>
|
||||
<p className={`text-sm font-medium ${strongText}`} id={`ipal-consent-${cat}`}>
|
||||
{texts.categories[cat].title}
|
||||
</p>
|
||||
<p className={`text-xs ${mutedText}`}>{texts.categories[cat].description}</p>
|
||||
<p className={`text-xs ${mutedText}`} id={`ipal-consent-${cat}-desc`}>
|
||||
{texts.categories[cat].description}
|
||||
</p>
|
||||
</div>
|
||||
<input
|
||||
aria-describedby={`ipal-consent-${cat}-desc`}
|
||||
aria-labelledby={`ipal-consent-${cat}`}
|
||||
checked={cat === 'necessary' ? true : choices[cat]}
|
||||
className="mt-1 h-4 w-4 shrink-0 accent-[var(--ipal-primary,#2563eb)]"
|
||||
disabled={cat === 'necessary'}
|
||||
@@ -138,10 +142,10 @@ export function CookieBanner({ classNames }: { classNames?: CookieBannerClassNam
|
||||
))}
|
||||
</ul>
|
||||
<div className="flex justify-end gap-2">
|
||||
<button className={secondaryClass} data-ipal="back" onClick={() => setShowSettings(false)}>
|
||||
<button className={secondaryClass} data-ipal="back" onClick={() => setShowSettings(false)} type="button">
|
||||
{texts.buttons.back}
|
||||
</button>
|
||||
<button className={primaryClass} data-ipal="save" onClick={() => savePreferences(choices)}>
|
||||
<button className={primaryClass} data-ipal="save" onClick={() => savePreferences(choices)} type="button">
|
||||
{texts.buttons.save}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -36,6 +36,7 @@ export function CookieButton({ className }: { className?: string } = {}) {
|
||||
className={cls}
|
||||
data-ipal="cookie-button"
|
||||
onClick={reopen}
|
||||
type="button"
|
||||
>
|
||||
<Cookie
|
||||
aria-hidden="true"
|
||||
|
||||
Reference in New Issue
Block a user