diff --git a/web/e2e/article-editor.spec.ts b/web/e2e/article-editor.spec.ts
new file mode 100644
index 00000000..861cecaa
--- /dev/null
+++ b/web/e2e/article-editor.spec.ts
@@ -0,0 +1,50 @@
+import { expect, test } from "@playwright/test";
+
+import { loginAsAdmin } from "./helpers";
+
+test.beforeEach(async ({ page }) => {
+ await loginAsAdmin(page);
+ await page.goto("/article/editor");
+});
+
+test("toggles the article summary with Enter and Space", async ({ page }) => {
+ const summary = page.getByRole("button", { name: /^(Summary|文章摘要)$/ });
+ const content = page.getByPlaceholder(/Enter article summary|请输入文章摘要/);
+
+ await expect(summary).toHaveAttribute("aria-expanded", "true");
+ await summary.press("Enter");
+ await expect(summary).toHaveAttribute("aria-expanded", "false");
+ await expect(summary).toBeFocused();
+ await expect(content).toBeHidden();
+
+ await summary.press("Space");
+ await expect(summary).toHaveAttribute("aria-expanded", "true");
+ await expect(content).toBeVisible();
+});
+
+test("moves between editor toolbar buttons and activates them with the keyboard", async ({
+ page,
+}) => {
+ const split = page.getByRole("button", { name: /^(Split|分屏)$/ });
+ const toolbar = page.locator("header").filter({ has: split });
+ const edit = toolbar.getByRole("button", { name: /^(Edit|编辑)$/ });
+ const preview = toolbar.getByRole("button", { name: /^(Preview|预览)$/ });
+ const outline = toolbar.getByRole("button", { name: /^(Outline|大纲)$/ });
+
+ await expect(split).toHaveAttribute("aria-pressed", "true");
+ await edit.press("Enter");
+ await expect(edit).toHaveAttribute("aria-pressed", "true");
+ await page.keyboard.press("Tab");
+ await expect(split).toBeFocused();
+ await page.keyboard.press("Tab");
+ await expect(preview).toBeFocused();
+ await page.keyboard.press("Space");
+ await expect(preview).toHaveAttribute("aria-pressed", "true");
+
+ await outline.press("Enter");
+ await expect(outline).toHaveAttribute("aria-pressed", "false");
+ await outline.press("Space");
+ await expect(outline).toHaveAttribute("aria-pressed", "true");
+ await page.keyboard.press("Tab");
+ await expect(toolbar.getByRole("button", { name: /^(Fullscreen|全屏)$/ })).toBeFocused();
+});
diff --git a/web/src/modules/article/components/EditorMetaPanel.tsx b/web/src/modules/article/components/EditorMetaPanel.tsx
index 2c68f522..a0641ab4 100644
--- a/web/src/modules/article/components/EditorMetaPanel.tsx
+++ b/web/src/modules/article/components/EditorMetaPanel.tsx
@@ -14,12 +14,17 @@ export function EditorMetaPanel({ title, defaultOpen = true, children }: EditorM
return (