diff --git a/frontend/src/views/Dashboard/Dashboard.css b/frontend/src/views/Dashboard/Dashboard.css index 1b77960..38855b0 100644 --- a/frontend/src/views/Dashboard/Dashboard.css +++ b/frontend/src/views/Dashboard/Dashboard.css @@ -170,7 +170,15 @@ h2 { } .record-list { display: grid; + align-content: start; gap: 8px; + max-height: 280px; + overflow-y: auto; + scrollbar-gutter: stable; +} +.record-list:focus-visible { + outline: 2px solid #315aaa; + outline-offset: 3px; } .record-row { display: flex; diff --git a/frontend/src/views/Dashboard/Dashboard.test.js b/frontend/src/views/Dashboard/Dashboard.test.js index 50db230..0902516 100644 --- a/frontend/src/views/Dashboard/Dashboard.test.js +++ b/frontend/src/views/Dashboard/Dashboard.test.js @@ -566,3 +566,20 @@ test("domainAction.refreshesSuccessfulResultAndRetainsNotice", async (t) => { assert.match(state.notice.value, /example\.test/); assert.deepEqual(state.tasks.value, [{ id: "task-2", status: "success" }]); }); + +test("dashboardLayout.keepsActivityListsBoundedAndKeyboardAccessible", async () => { + const { readFile } = await import("node:fs/promises"); + const template = await readFile(new URL("./Dashboard.vue", import.meta.url), "utf8"); + const stylesheet = await readFile(new URL("./Dashboard.css", import.meta.url), "utf8"); + assert.equal((template.match(/class="record-list" tabindex="0"/g) || []).length, 3); + assert.match(stylesheet, /\.record-list\s*\{[^}]*max-height:\s*280px;[^}]*overflow-y:\s*auto;/); + assert.match(stylesheet, /\.record-list:focus-visible/); +}); + +test("dashboardLayout.usesSharedTooltipForUserManagementDescription", async () => { + const { readFile } = await import("node:fs/promises"); + const template = await readFile(new URL("../UserManagement/UserManagement.vue", import.meta.url), "utf8"); + assert.match(template, /import HelpTip from "\.\.\/components\/HelpTip\/HelpTip.vue";/); + assert.match(template, /[\s\S]*?<\/HelpTip>/); + assert.doesNotMatch(template, /

/); +}); \ No newline at end of file diff --git a/frontend/src/views/Dashboard/Dashboard.vue b/frontend/src/views/Dashboard/Dashboard.vue index bd0a3ba..6cc4a46 100644 --- a/frontend/src/views/Dashboard/Dashboard.vue +++ b/frontend/src/views/Dashboard/Dashboard.vue @@ -209,7 +209,7 @@ const {

证书状态

暂无证书记录
-
+
{{ item.domain.name }} @@ -224,7 +224,7 @@ const {

任务记录

暂无任务记录
-
+
{{ taskTypeLabel(item.task_type) }} @@ -250,7 +250,7 @@ const {

审计日志

暂无审计日志
-
+
{{ auditActionLabel(item.action) }} diff --git a/frontend/src/views/UserManagement/UserManagement.vue b/frontend/src/views/UserManagement/UserManagement.vue index 16b6761..017e346 100644 --- a/frontend/src/views/UserManagement/UserManagement.vue +++ b/frontend/src/views/UserManagement/UserManagement.vue @@ -1,4 +1,5 @@