diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000000..b7734e64bb --- /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");