From 3c4285427a10a0922eb5bc13954fb6523077acb2 Mon Sep 17 00:00:00 2001
From: mkerz-masfg <151519264+mkerz-masfg@users.noreply.github.com>
Date: Mon, 30 Nov 2026 10:39:46 +0100
Subject: [PATCH 1/4] Update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06959dff1..84fc636c8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## unreleased
+- An `alert` without `color` uses the info color again, and its `role` attribute no longer starts with a space. ([#1697](https://github.com/sqlpage/SQLPage/issues/1697))
- The `table` component can fetch and display HTML fragments in selected columns using `embed`.
- New `navbar_toggle_label` property on the `shell` and `close_label` property on the `alert` component, to translate the accessible names of the menu toggle button and of the alert close button. ([#1632](https://github.com/sqlpage/SQLPage/issues/1632))
- Updated Rust and browser dependencies, including SQLite, ApexCharts, and Tabler.
From 5e52f003a72961b083e55b65aed1ff4eb33c35a1 Mon Sep 17 00:00:00 2001
From: mkerz-masfg <151519264+mkerz-masfg@users.noreply.github.com>
Date: Mon, 30 Nov 2026 10:43:19 +0100
Subject: [PATCH 2/4] Restore the default info color of alerts
The default value " info" had a leading space, so an alert without color got the classes "alert-" and "info" instead of "alert-info" and was grey.
The role attribute had the same leading space.
---
sqlpage/templates/alert.handlebars | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sqlpage/templates/alert.handlebars b/sqlpage/templates/alert.handlebars
index e8a6fcdbd..5c4660f4f 100644
--- a/sqlpage/templates/alert.handlebars
+++ b/sqlpage/templates/alert.handlebars
@@ -1,5 +1,5 @@
-
+
{{~#if icon~}}
From 637cac27878688990e77740b1d997bda87ff219d Mon Sep 17 00:00:00 2001
From: mkerz-masfg <151519264+mkerz-masfg@users.noreply.github.com>
Date: Mon, 30 Nov 2026 10:44:47 +0100
Subject: [PATCH 3/4] Add alert default color fixture page
---
tests/end-to-end/fixtures/alert-default-color/index.sql | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 tests/end-to-end/fixtures/alert-default-color/index.sql
diff --git a/tests/end-to-end/fixtures/alert-default-color/index.sql b/tests/end-to-end/fixtures/alert-default-color/index.sql
new file mode 100644
index 000000000..09da8bbbc
--- /dev/null
+++ b/tests/end-to-end/fixtures/alert-default-color/index.sql
@@ -0,0 +1,2 @@
+SELECT 'alert' AS component, 'Default color' AS title, 'No color property.' AS description;
+SELECT 'alert' AS component, 'Explicit color' AS title, 'red' AS color;
From e158417ea07fe193c9ec3cc4f8aab137b62fc474 Mon Sep 17 00:00:00 2001
From: mkerz-masfg <151519264+mkerz-masfg@users.noreply.github.com>
Date: Mon, 30 Nov 2026 10:45:40 +0100
Subject: [PATCH 4/4] Test the default color and the role of alerts
---
tests/end-to-end/fixtures/alert-default-color/test.ts | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 tests/end-to-end/fixtures/alert-default-color/test.ts
diff --git a/tests/end-to-end/fixtures/alert-default-color/test.ts b/tests/end-to-end/fixtures/alert-default-color/test.ts
new file mode 100644
index 000000000..a964e7a13
--- /dev/null
+++ b/tests/end-to-end/fixtures/alert-default-color/test.ts
@@ -0,0 +1,9 @@
+import { expect, test } from "../../fixture.ts";
+
+test("an alert without color uses the info color", async ({ page }) => {
+ await expect(page.locator(".alert").first()).toHaveClass(/\balert-info\b/);
+});
+
+test("the role attribute of every alert is exactly alert", async ({ page }) => {
+ await expect(page.locator('.alert[role="alert"]')).toHaveCount(2);
+});