From eccfa760db0e8b034d7f69fe01c0109b96df6c12 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 18 Oct 2026 01:50:52 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20missing=20A?= =?UTF-8?q?RIA=20labels=20to=20empty=20icon=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `aria-label` attributes to the empty `theme-btn` elements and the inline tag add `+` button in `pkgs/id/src/web/templates.rs`. This ensures these icon-only buttons are properly accessible to screen readers, providing clear context about their function. Also recorded this learning in `.Jules/palette.md` for future reference. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ pkgs/id/src/web/templates.rs | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000000..b69638722a --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,4 @@ + +## 2026-10-18 - Accessible Icon Buttons in Server Templates +**Learning:** In the `id` app, structural UI elements like empty icon buttons (e.g., theme selectors, inline tag buttons) are rendered in Rust backend templates (`pkgs/id/src/web/templates.rs`). These buttons frequently rely on CSS classes (like `theme-btn`) for visual styling but omit screen-reader accessible text. +**Action:** Always verify that empty icon buttons in `templates.rs` include an `aria-label` attribute alongside any `title` attribute to ensure proper accessibility for screen readers. diff --git a/pkgs/id/src/web/templates.rs b/pkgs/id/src/web/templates.rs index a052af54fe..38376df2a1 100644 --- a/pkgs/id/src/web/templates.rs +++ b/pkgs/id/src/web/templates.rs @@ -93,9 +93,9 @@ pub fn render_main_page_wrapper(content: &str) -> String { html.push_str(" peers\n"); html.push_str(" settings\n"); html.push_str(" \n"); - html.push_str(" \n"); - html.push_str(" \n"); - html.push_str(" \n"); + html.push_str(" \n"); + html.push_str(" \n"); + html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); @@ -458,9 +458,9 @@ pub fn render_editor(doc_id: &str, name: &str, content: &str, hash: &str) -> Str html.push_str(" peers\n"); html.push_str(" settings\n"); html.push_str(" \n"); - html.push_str(" \n"); - html.push_str(" \n"); - html.push_str(" \n"); + html.push_str(" \n"); + html.push_str(" \n"); + html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); @@ -474,7 +474,7 @@ pub fn render_editor(doc_id: &str, name: &str, content: &str, hash: &str) -> Str html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); - html.push_str(" \n"); + html.push_str(" \n"); html.push_str(" \n"); html.push_str(" \n"); From e7ca7b582cff5256006f17c70261aabd78ee786e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 18 Oct 2026 02:04:28 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20missing=20A?= =?UTF-8?q?RIA=20labels=20to=20empty=20icon=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `aria-label` attributes to the empty `theme-btn` elements and the inline tag add `+` button in `pkgs/id/src/web/templates.rs`. This ensures these icon-only buttons are properly accessible to screen readers, providing clear context about their function. Also recorded this learning in `.Jules/palette.md` for future reference. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .Jules/palette.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index b69638722a..b7734e64bb 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -1,4 +1,4 @@ - ## 2026-10-18 - Accessible Icon Buttons in Server Templates + **Learning:** In the `id` app, structural UI elements like empty icon buttons (e.g., theme selectors, inline tag buttons) are rendered in Rust backend templates (`pkgs/id/src/web/templates.rs`). These buttons frequently rely on CSS classes (like `theme-btn`) for visual styling but omit screen-reader accessible text. **Action:** Always verify that empty icon buttons in `templates.rs` include an `aria-label` attribute alongside any `title` attribute to ensure proper accessibility for screen readers.