From b4d31805078d314b5bb033f35e2798fcc028a25f Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Fri, 3 May 2024 10:13:34 +0800 Subject: [PATCH] https://ld246.com/article/1714662110914 (#11228) --- app/src/history/history.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 0dff8cd62..414677e13 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -569,6 +569,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { }, (response) => { iconElement.classList.add("b3-list-item__arrow--open"); let html = ""; + let ariaLabel = ""; response.data.items.forEach((docItem: { title: string, path: string, @@ -578,19 +579,28 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { let chipClass = " b3-chip b3-chip--list "; if (docItem.op === "clean") { chipClass += "b3-chip--primary "; + ariaLabel = window.siyuan.languages.historyClean; } else if (docItem.op === "update") { chipClass += "b3-chip--info "; + ariaLabel = window.siyuan.languages.historyUpdate; } else if (docItem.op === "delete") { chipClass += "b3-chip--error "; + ariaLabel = window.siyuan.languages.historyDelete; } else if (docItem.op === "format") { chipClass += "b3-chip--pink "; + ariaLabel = window.siyuan.languages.historyFormat; } else if (docItem.op === "sync") { chipClass += "b3-chip--success "; + ariaLabel = window.siyuan.languages.historySync; } else if (docItem.op === "replace") { chipClass += "b3-chip--secondary "; + ariaLabel = window.siyuan.languages.historyReplace; + } else if (docItem.op === "outline") { + chipClass += "b3-chip--warning "; + ariaLabel = window.siyuan.languages.historyOutline; } html += `
  • - ${docItem.op.substring(0, 1).toUpperCase()} + ${docItem.op.substring(0, 1).toUpperCase()} ${escapeHtml(docItem.title)}