Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2026-10-19 - Missing ARIA Labels on Template Buttons
**Learning:** The server-rendered HTML templates (`pkgs/id/src/web/templates.rs`) often miss `aria-label` attributes on empty or icon-only interactive elements like theme selectors or short "+" buttons, despite having visual `title` attributes. This is a common accessibility anti-pattern in this app's UI.
**Action:** Always check server-rendered HTML blocks for missing `aria-label`s on `button` tags when they are visually minimal or empty.
14 changes: 7 additions & 7 deletions pkgs/id/src/web/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ pub fn render_main_page_wrapper(content: &str) -> String {
html.push_str(" <a href=\"/peers\" data-nav class=\"crt-glow\">peers</a>\n");
html.push_str(" <a href=\"/settings\" data-nav class=\"crt-glow\">settings</a>\n");
html.push_str(" <span class=\"flex items-center gap-1\">\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"sneak\" title=\"Sneak theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"arch\" title=\"Arch theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"mech\" title=\"Mech theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"sneak\" title=\"Sneak theme\" aria-label=\"Sneak theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"arch\" title=\"Arch theme\" aria-label=\"Arch theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"mech\" title=\"Mech theme\" aria-label=\"Mech theme\"></button>\n");
html.push_str(" </span>\n");
html.push_str(" </nav>\n");
html.push_str(" </header>\n");
Expand Down Expand Up @@ -458,9 +458,9 @@ pub fn render_editor(doc_id: &str, name: &str, content: &str, hash: &str) -> Str
html.push_str(" <a href=\"/peers\" data-nav>peers</a>\n");
html.push_str(" <a href=\"/settings\" data-nav>settings</a>\n");
html.push_str(" <span class=\"flex items-center gap-1\">\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"sneak\" title=\"Sneak theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"arch\" title=\"Arch theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"mech\" title=\"Mech theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"sneak\" title=\"Sneak theme\" aria-label=\"Sneak theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"arch\" title=\"Arch theme\" aria-label=\"Arch theme\"></button>\n");
html.push_str(" <button class=\"theme-btn\" data-theme=\"mech\" title=\"Mech theme\" aria-label=\"Mech theme\"></button>\n");
html.push_str(" </span>\n");
html.push_str(" </nav>\n");
html.push_str(" </div>\n");
Expand All @@ -474,7 +474,7 @@ pub fn render_editor(doc_id: &str, name: &str, content: &str, hash: &str) -> Str
html.push_str(" <span class=\"flex items-center gap-1\" id=\"tag-add-inline\">\n");
html.push_str(" <input type=\"text\" id=\"tag-add-key\" class=\"input input-bordered input-xs w-20 bg-base-100\" placeholder=\"key\" />\n");
html.push_str(" <input type=\"text\" id=\"tag-add-value\" class=\"input input-bordered input-xs w-20 bg-base-100\" placeholder=\"value\" />\n");
html.push_str(" <button class=\"btn btn-ghost btn-xs font-mono\" onclick=\"window.idApp?.addTagInline?.()\">+</button>\n");
html.push_str(" <button class=\"btn btn-ghost btn-xs font-mono\" onclick=\"window.idApp?.addTagInline?.()\" aria-label=\"Add tag\">+</button>\n");
html.push_str(" </span>\n");
html.push_str(" </div>\n");

Expand Down
Loading