From 5fdf158e887f817b67bd2d18261a1e171673b1ba Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 01:56:35 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20ARIA=20labe?= =?UTF-8?q?ls=20to=20empty=20icon=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added `aria-label` attributes to icon-only buttons (theme selectors and the '+' add tag button). 🎯 Why: Empty icon buttons without `aria-label`s are an accessibility anti-pattern. While the theme buttons had `title` attributes, `aria-label`s are necessary for robust screen reader support. The '+' button lacked both title and `aria-label`. 📸 Before/After: Visuals remain unchanged. Accessibility tree now correctly labels these buttons. ♿ Accessibility: Improved screen reader support for key interactive elements. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .Jules/palette.md | 3 +++ pkgs/id/src/blob_gate.rs | 5 +---- pkgs/id/src/web/templates.rs | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 000000000..e798b5014 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2026-10-17 - Icon-only Button Accessibility +**Learning:** Missing aria-labels on icon-only buttons (like theme toggles and inline add buttons) is a recurring accessibility issue in server-rendered Rust templates. Title attributes alone are insufficient. +**Action:** Always explicitly check for and add aria-label attributes to empty buttons when modifying server-rendered templates in pkgs/id/src/web/templates.rs. diff --git a/pkgs/id/src/blob_gate.rs b/pkgs/id/src/blob_gate.rs index d8d207fd6..e64b3bdd3 100644 --- a/pkgs/id/src/blob_gate.rs +++ b/pkgs/id/src/blob_gate.rs @@ -125,10 +125,7 @@ pub struct FoldedWorlds { impl FoldedWorlds { /// Pairs the folded worlds with a reference index. pub const fn new(worlds: Worlds, references: HashMap>) -> Self { - Self { - worlds, - references, - } + Self { worlds, references } } } diff --git a/pkgs/id/src/web/templates.rs b/pkgs/id/src/web/templates.rs index a052af54f..76c609938 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 fe3dd8c4a5776d8f09ac06d283ac2a057778da46 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 02:08:06 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20UX=20learni?= =?UTF-8?q?ngs=20to=20journal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added aria-labels to empty icon buttons based on the user instruction. Also formatting updates fixing prettier issues. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .Jules/palette.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.Jules/palette.md b/.Jules/palette.md index e798b5014..bd997f482 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -1,3 +1,4 @@ ## 2026-10-17 - Icon-only Button Accessibility + **Learning:** Missing aria-labels on icon-only buttons (like theme toggles and inline add buttons) is a recurring accessibility issue in server-rendered Rust templates. Title attributes alone are insufficient. **Action:** Always explicitly check for and add aria-label attributes to empty buttons when modifying server-rendered templates in pkgs/id/src/web/templates.rs. From 0ad3282391586c1ac429027d5dc5e031c24497bc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 03:13:30 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20UX=20learni?= =?UTF-8?q?ngs=20to=20journal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added aria-labels to empty icon buttons based on the user instruction. Also formatting updates fixing prettier issues. Fix clippy test warning in web mod. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- pkgs/id/src/web/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/id/src/web/mod.rs b/pkgs/id/src/web/mod.rs index c6731d804..fccd4c190 100644 --- a/pkgs/id/src/web/mod.rs +++ b/pkgs/id/src/web/mod.rs @@ -115,7 +115,7 @@ impl SaveRateLimiter { if let Some(last) = map.get(name) { let elapsed = last.elapsed(); if elapsed < self.cooldown { - return Err(self.cooldown.checked_sub(elapsed).unwrap()); + return Err(self.cooldown.checked_sub(elapsed).unwrap_or(Duration::from_secs(0))); } } Ok(())