From 5abc4a5334747e3ad5eb5f99a02246e5384ecc79 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Wed, 28 Oct 2026 10:44:18 +0100
Subject: [PATCH] fix: make the tag and address book row buttons and New tag
full-size buttons with a touch hit area, and name each tag button after its
tag
---
.../__tests__/keyword-settings.test.tsx | 11 ++++
.../__tests__/settings-delete-undo.test.tsx | 3 +-
.../address-book-management-settings.tsx | 53 +++++++------------
components/settings/keyword-settings.tsx | 39 +++++++-------
locales/ar/common.json | 2 +
locales/ca/common.json | 2 +
locales/cs/common.json | 2 +
locales/da/common.json | 2 +
locales/de/common.json | 2 +
locales/en/common.json | 2 +
locales/es/common.json | 2 +
locales/et/common.json | 2 +
locales/fa/common.json | 2 +
locales/fr/common.json | 2 +
locales/he/common.json | 2 +
locales/hu/common.json | 2 +
locales/it/common.json | 2 +
locales/ja/common.json | 2 +
locales/ko/common.json | 2 +
locales/lv/common.json | 2 +
locales/mn/common.json | 2 +
locales/nb/common.json | 2 +
locales/nl/common.json | 2 +
locales/pl/common.json | 2 +
locales/pt/common.json | 2 +
locales/ro/common.json | 2 +
locales/ru/common.json | 2 +
locales/sk/common.json | 2 +
locales/th/common.json | 2 +
locales/tr/common.json | 2 +
locales/uk/common.json | 2 +
locales/zh-TW/common.json | 2 +
locales/zh/common.json | 2 +
33 files changed, 108 insertions(+), 56 deletions(-)
diff --git a/components/settings/__tests__/keyword-settings.test.tsx b/components/settings/__tests__/keyword-settings.test.tsx
index 333a37ecf..6e994ce58 100644
--- a/components/settings/__tests__/keyword-settings.test.tsx
+++ b/components/settings/__tests__/keyword-settings.test.tsx
@@ -89,6 +89,17 @@ describe('KeywordSettings', () => {
expect(useSettingsStore.getState().emailKeywords.find((k) => k.id === 'red')).toBeUndefined();
});
+ // A list of "Edit" / "Delete" with nothing else said which tag a screen
+ // reader user was on; each button is named after its tag now, as a full
+ // size icon button (32px, 44px hit area on touch).
+ it('names each tag row button after its tag', () => {
+ render();
+ expect(screen.getAllByRole('button', { name: 'edit_tag' })).toHaveLength(DEFAULT_KEYWORDS.length);
+ const deletes = screen.getAllByRole('button', { name: 'delete_tag' });
+ expect(deletes).toHaveLength(DEFAULT_KEYWORDS.length);
+ expect(deletes[0].className).toContain('h-8 w-8');
+ });
+
it('shows edit form when edit button clicked', () => {
render();
const editButtons = screen.getAllByTitle('edit');
diff --git a/components/settings/__tests__/settings-delete-undo.test.tsx b/components/settings/__tests__/settings-delete-undo.test.tsx
index 63b633221..5433e965a 100644
--- a/components/settings/__tests__/settings-delete-undo.test.tsx
+++ b/components/settings/__tests__/settings-delete-undo.test.tsx
@@ -45,7 +45,8 @@ describe('deleting a tag', () => {
render();
const second = DEFAULT_KEYWORDS[1];
- fireEvent.click(screen.getAllByRole('button', { name: 'delete' })[1]);
+ // Each Delete is named after its tag (the mocked t returns the key).
+ fireEvent.click(screen.getAllByRole('button', { name: 'delete_tag' })[1]);
expect(useSettingsStore.getState().emailKeywords.map((k) => k.id)).not.toContain(second.id);
expect(screen.queryByRole('alertdialog')).toBeNull();
diff --git a/components/settings/address-book-management-settings.tsx b/components/settings/address-book-management-settings.tsx
index 6145958ba..a9f78de91 100644
--- a/components/settings/address-book-management-settings.tsx
+++ b/components/settings/address-book-management-settings.tsx
@@ -9,6 +9,7 @@ import { useManagedAccountStore } from "@/stores/managed-account-store";
import { toast } from "@/stores/toast-store";
import { SettingsSection } from "./settings-section";
import { cn } from "@/lib/utils";
+import { IconButton } from "@/components/ui/icon-button";
import type { AddressBook, AddressBookRights } from "@/lib/jmap/types";
import { ShareCollectionDialog } from "./share-collection-dialog";
import { PromptDialog } from "@/components/ui/prompt-dialog";
@@ -207,10 +208,10 @@ export function AddressBookManagementSettings() {
>
- {book.name}
+ {book.name}
{book.isDefault && (
-
+
{t("default")}
)}
@@ -227,49 +228,31 @@ export function AddressBookManagementSettings() {
);
})()}
-
+
{canRename && (
-
+
setEditingId(book.id)} className="text-muted-foreground">
+
+
)}
{canSetDefault && (
-
+
handleSetDefault(book)} disabled={isLoading} className="text-muted-foreground">
+
+
)}
{!book.isShared && book.myRights?.mayShare && (
-
+
setSharingId(book.id)} className="text-muted-foreground">
+
+
)}
{canDelete && (
-
+
+
)}
diff --git a/components/settings/keyword-settings.tsx b/components/settings/keyword-settings.tsx
index 27539452c..d2438404f 100644
--- a/components/settings/keyword-settings.tsx
+++ b/components/settings/keyword-settings.tsx
@@ -16,6 +16,8 @@ import { useEmailStore } from "@/stores/email-store";
import { useFilterStore } from "@/stores/filter-store";
import { SettingsSection, SettingItem, ToggleSwitch, Select, AdvancedOnly } from './settings-section';
import { Plus, Pencil, Trash2, GripVertical, Check, X, Loader2, Search } from "@/components/icons";
+import { Button } from "@/components/ui/button";
+import { IconButton } from "@/components/ui/icon-button";
import { cn } from "@/lib/utils";
import { KEYWORD_PREFIX } from "@/lib/thread-utils";
import { findUnrecognizedKeywords, type UnrecognizedKeyword } from "@/lib/keyword-discovery";
@@ -93,6 +95,7 @@ function KeywordRow({
}) {
const t = useTranslations("settings.keywords");
const hasChildren = hasChildKeywords(keyword.id, keywords);
+ const tagLabel = keyword.label || keyword.id;
// Measured with the prefix attached, since that is what occupies the column.
const keywordCandidates = (nestedTags ? keywordRenderings(keywordLevels(keyword.id)) : [keyword.id])
.map((rendering) => KEYWORD_PREFIX + rendering);
@@ -134,24 +137,19 @@ function KeywordRow({
ariaLabel={t("visibility_field")}
className="text-xs py-1"
/>
-
);
@@ -727,17 +725,18 @@ export function KeywordSettings() {
/>
) : (
-
+
)}
diff --git a/locales/ar/common.json b/locales/ar/common.json
index ed53371f8..823c03578 100644
--- a/locales/ar/common.json
+++ b/locales/ar/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "معرّف الوسم هذا موجود بالفعل",
"edit": "تعديل الوسم",
"delete": "حذف الوسم",
+ "edit_tag": "تعديل {name}",
+ "delete_tag": "حذف {name}",
"deleted": "تم حذف الوسم",
"save": "حفظ",
"add": "إضافة",
diff --git a/locales/ca/common.json b/locales/ca/common.json
index d1140cb30..067b7f116 100644
--- a/locales/ca/common.json
+++ b/locales/ca/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Aquest ID d'etiqueta ja existeix",
"edit": "Edita l'etiqueta",
"delete": "Suprimeix l'etiqueta",
+ "edit_tag": "Edita {name}",
+ "delete_tag": "Suprimeix {name}",
"deleted": "Etiqueta suprimida",
"save": "Desa",
"add": "Afegeix",
diff --git a/locales/cs/common.json b/locales/cs/common.json
index a4de56156..3ea590e49 100644
--- a/locales/cs/common.json
+++ b/locales/cs/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Toto ID štítku již existuje",
"edit": "Upravit štítek",
"delete": "Odstranit štítek",
+ "edit_tag": "Upravit {name}",
+ "delete_tag": "Smazat {name}",
"deleted": "Štítek byl odstraněn",
"save": "Uložit",
"add": "Přidat",
diff --git a/locales/da/common.json b/locales/da/common.json
index d9b47bc99..e6518f354 100644
--- a/locales/da/common.json
+++ b/locales/da/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Dette tag-ID findes allerede",
"edit": "Redigér tag",
"delete": "Slet tag",
+ "edit_tag": "Rediger {name}",
+ "delete_tag": "Slet {name}",
"deleted": "Tag slettet",
"save": "Gem",
"add": "Tilføj",
diff --git a/locales/de/common.json b/locales/de/common.json
index 7a3c452b4..00ee17341 100644
--- a/locales/de/common.json
+++ b/locales/de/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Diese Label-ID existiert bereits",
"edit": "Label bearbeiten",
"delete": "Label löschen",
+ "edit_tag": "{name} bearbeiten",
+ "delete_tag": "{name} löschen",
"deleted": "Label gelöscht",
"save": "Speichern",
"add": "Hinzufügen",
diff --git a/locales/en/common.json b/locales/en/common.json
index 91582f0e1..a2323d3c5 100644
--- a/locales/en/common.json
+++ b/locales/en/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "This tag ID already exists",
"edit": "Edit tag",
"delete": "Delete tag",
+ "edit_tag": "Edit {name}",
+ "delete_tag": "Delete {name}",
"deleted": "Tag deleted",
"save": "Save",
"add": "Add",
diff --git a/locales/es/common.json b/locales/es/common.json
index e199b0670..91602432e 100644
--- a/locales/es/common.json
+++ b/locales/es/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Este ID de etiqueta ya existe",
"edit": "Editar etiqueta",
"delete": "Eliminar etiqueta",
+ "edit_tag": "Editar {name}",
+ "delete_tag": "Eliminar {name}",
"deleted": "Etiqueta eliminada",
"save": "Guardar",
"add": "Añadir",
diff --git a/locales/et/common.json b/locales/et/common.json
index 85055ddce..a486a7ccb 100644
--- a/locales/et/common.json
+++ b/locales/et/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "See sildi ID on juba kasutusel",
"edit": "Muuda silti",
"delete": "Kustuta silt",
+ "edit_tag": "Muuda {name}",
+ "delete_tag": "Kustuta {name}",
"deleted": "Silt kustutatud",
"save": "Salvesta",
"add": "Lisa",
diff --git a/locales/fa/common.json b/locales/fa/common.json
index 6e6bbf648..32cca33bf 100644
--- a/locales/fa/common.json
+++ b/locales/fa/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "این شناسه قبلاً وجود دارد",
"edit": "ویرایش برچسب",
"delete": "حذف برچسب",
+ "edit_tag": "ویرایش {name}",
+ "delete_tag": "حذف {name}",
"deleted": "برچسب حذف شد",
"save": "ذخیره",
"add": "افزودن",
diff --git a/locales/fr/common.json b/locales/fr/common.json
index 3bcef07e3..ba68726aa 100644
--- a/locales/fr/common.json
+++ b/locales/fr/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Cet ID d'étiquette existe déjà",
"edit": "Éditer l'étiquette",
"delete": "Supprimer l'étiquette",
+ "edit_tag": "Modifier {name}",
+ "delete_tag": "Supprimer {name}",
"deleted": "Étiquette supprimée",
"save": "Enregistrer",
"add": "Ajouter",
diff --git a/locales/he/common.json b/locales/he/common.json
index 9cb89dd7f..f3acd04f5 100644
--- a/locales/he/common.json
+++ b/locales/he/common.json
@@ -1315,6 +1315,8 @@
"id_exists": "מזהה מילת מפתח זה כבר קיים",
"edit": "ערוך מילת מפתח",
"delete": "מחק מילת מפתח",
+ "edit_tag": "עריכת {name}",
+ "delete_tag": "מחיקת {name}",
"deleted": "מילת המפתח נמחקה",
"save": "שמור",
"add": "לְהוֹסִיף",
diff --git a/locales/hu/common.json b/locales/hu/common.json
index 94f8ad664..f0ab1175d 100644
--- a/locales/hu/common.json
+++ b/locales/hu/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Ez a címke azonosító már létezik",
"edit": "Címke szerkesztése",
"delete": "Címke törlése",
+ "edit_tag": "{name} szerkesztése",
+ "delete_tag": "{name} törlése",
"deleted": "Címke törölve",
"save": "Mentés",
"add": "Hozzáadás",
diff --git a/locales/it/common.json b/locales/it/common.json
index 2de6a01ff..dc504b500 100644
--- a/locales/it/common.json
+++ b/locales/it/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Questo ID etichetta esiste già",
"edit": "Modifica etichetta",
"delete": "Elimina etichetta",
+ "edit_tag": "Modifica {name}",
+ "delete_tag": "Elimina {name}",
"deleted": "Etichetta eliminata",
"save": "Salva",
"add": "Aggiungi",
diff --git a/locales/ja/common.json b/locales/ja/common.json
index 7ce5da10f..03b8fff4f 100644
--- a/locales/ja/common.json
+++ b/locales/ja/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "このラベルIDは既に存在します",
"edit": "ラベルを編集",
"delete": "ラベルを削除",
+ "edit_tag": "{name} を編集",
+ "delete_tag": "{name} を削除",
"deleted": "ラベルを削除しました",
"save": "保存",
"add": "追加",
diff --git a/locales/ko/common.json b/locales/ko/common.json
index 29f52e38d..5bff2b2fe 100644
--- a/locales/ko/common.json
+++ b/locales/ko/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "이 태그 ID는 이미 존재합니다",
"edit": "태그 편집",
"delete": "태그 삭제",
+ "edit_tag": "{name} 편집",
+ "delete_tag": "{name} 삭제",
"deleted": "태그가 삭제되었어요",
"save": "저장",
"add": "추가",
diff --git a/locales/lv/common.json b/locales/lv/common.json
index 5e6a711ec..ccc0e0277 100644
--- a/locales/lv/common.json
+++ b/locales/lv/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Šāds taga identifikators jau pastāv",
"edit": "Rediģēt tagu",
"delete": "Dzēst tagu",
+ "edit_tag": "Rediģēt {name}",
+ "delete_tag": "Dzēst {name}",
"deleted": "Tags izdzēsts",
"save": "Saglabāt",
"add": "Pievienot",
diff --git a/locales/mn/common.json b/locales/mn/common.json
index 2bc750466..13d2163cb 100644
--- a/locales/mn/common.json
+++ b/locales/mn/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Энэ хаягийн ID аль хэдийн байна",
"edit": "Таг засах",
"delete": "Тагыг устгах",
+ "edit_tag": "{name}-г засах",
+ "delete_tag": "{name}-г устгах",
"deleted": "Таг устгасан",
"save": "Хадгалах",
"add": "Нэмэх",
diff --git a/locales/nb/common.json b/locales/nb/common.json
index 66f39372a..b52134802 100644
--- a/locales/nb/common.json
+++ b/locales/nb/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Denne etikett-ID-en finnes allerede",
"edit": "Rediger etikett",
"delete": "Slett etikett",
+ "edit_tag": "Rediger {name}",
+ "delete_tag": "Slett {name}",
"deleted": "Etikett slettet",
"save": "Lagre",
"add": "Legg til",
diff --git a/locales/nl/common.json b/locales/nl/common.json
index fd595555b..0471e7fba 100644
--- a/locales/nl/common.json
+++ b/locales/nl/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Deze label-ID bestaat al",
"edit": "Label bewerken",
"delete": "Label verwijderen",
+ "edit_tag": "{name} bewerken",
+ "delete_tag": "{name} verwijderen",
"deleted": "Label verwijderd",
"save": "Opslaan",
"add": "Toevoegen",
diff --git a/locales/pl/common.json b/locales/pl/common.json
index 568bd8911..6688b5327 100644
--- a/locales/pl/common.json
+++ b/locales/pl/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Ten ID etykiety już istnieje",
"edit": "Edytuj etykietę",
"delete": "Usuń etykietę",
+ "edit_tag": "Edytuj {name}",
+ "delete_tag": "Usuń {name}",
"deleted": "Etykieta usunięta",
"save": "Zapisz",
"add": "Dodaj",
diff --git a/locales/pt/common.json b/locales/pt/common.json
index b4f28e0fd..62bbca327 100644
--- a/locales/pt/common.json
+++ b/locales/pt/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Este ID de etiqueta já existe",
"edit": "Editar etiqueta",
"delete": "Eliminar etiqueta",
+ "edit_tag": "Editar {name}",
+ "delete_tag": "Excluir {name}",
"deleted": "Etiqueta eliminada",
"save": "Salvar",
"add": "Adicionar",
diff --git a/locales/ro/common.json b/locales/ro/common.json
index de504c70a..8d18147b9 100644
--- a/locales/ro/common.json
+++ b/locales/ro/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Această etichetă ID există deja",
"edit": "Editați eticheta",
"delete": "Șterge eticheta",
+ "edit_tag": "Editați {name}",
+ "delete_tag": "Ștergeți {name}",
"deleted": "Eticheta a fost ștearsă",
"save": "Salvare",
"add": "Adăugați",
diff --git a/locales/ru/common.json b/locales/ru/common.json
index eeba5d2d3..819a5a418 100644
--- a/locales/ru/common.json
+++ b/locales/ru/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Этот идентификатор тега уже существует",
"edit": "Редактировать тег",
"delete": "Удалить тег",
+ "edit_tag": "Изменить «{name}»",
+ "delete_tag": "Удалить «{name}»",
"deleted": "Тег удалён",
"save": "Сохранить",
"add": "Добавить",
diff --git a/locales/sk/common.json b/locales/sk/common.json
index 66d1d0b58..bbabc7687 100644
--- a/locales/sk/common.json
+++ b/locales/sk/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "Toto ID štítku už existuje",
"edit": "Upraviť štítok",
"delete": "Odstrániť štítok",
+ "edit_tag": "Upraviť {name}",
+ "delete_tag": "Zmazať {name}",
"deleted": "Štítok bol odstránený",
"save": "Uložiť",
"add": "Pridať",
diff --git a/locales/th/common.json b/locales/th/common.json
index cd740b2da..6e98d8b85 100644
--- a/locales/th/common.json
+++ b/locales/th/common.json
@@ -3534,6 +3534,8 @@
"id_exists": "รหัสแท็กนี้มีอยู่แล้ว",
"edit": "แก้ไขแท็ก",
"delete": "ลบแท็ก",
+ "edit_tag": "แก้ไข {name}",
+ "delete_tag": "ลบ {name}",
"deleted": "ลบแท็กแล้ว",
"save": "บันทึก",
"add": "เพิ่ม",
diff --git a/locales/tr/common.json b/locales/tr/common.json
index dd9fdf7a3..392a7102e 100644
--- a/locales/tr/common.json
+++ b/locales/tr/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Bu etiket kimliği zaten mevcut",
"edit": "Etiketi düzenle",
"delete": "Etiketi sil",
+ "edit_tag": "{name} düzenle",
+ "delete_tag": "{name} sil",
"deleted": "Etiket silindi",
"save": "Kaydet",
"add": "Ekle",
diff --git a/locales/uk/common.json b/locales/uk/common.json
index 0594999a3..ffcecb572 100644
--- a/locales/uk/common.json
+++ b/locales/uk/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "Цей ідентифікатор ключового слова вже існує",
"edit": "Редагувати ключове слово",
"delete": "Видалити ключове слово",
+ "edit_tag": "Редагувати «{name}»",
+ "delete_tag": "Видалити «{name}»",
"deleted": "Ключове слово видалено",
"save": "зберегти",
"add": "додати",
diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.json
index d40cab6f6..2b4e6f737 100644
--- a/locales/zh-TW/common.json
+++ b/locales/zh-TW/common.json
@@ -1353,6 +1353,8 @@
"id_exists": "此標籤 ID 已存在",
"edit": "編輯標籤",
"delete": "刪除標籤",
+ "edit_tag": "編輯 {name}",
+ "delete_tag": "刪除 {name}",
"deleted": "標籤已刪除",
"save": "儲存",
"add": "新增",
diff --git a/locales/zh/common.json b/locales/zh/common.json
index 9265219ce..d9fd86e5f 100644
--- a/locales/zh/common.json
+++ b/locales/zh/common.json
@@ -1350,6 +1350,8 @@
"id_exists": "此标签ID已存在",
"edit": "编辑标签",
"delete": "删除标签",
+ "edit_tag": "编辑 {name}",
+ "delete_tag": "删除 {name}",
"deleted": "标签已删除",
"save": "保存",
"add": "添加",