Skip to content

Build your personal knowledge base with Trilium Notes

refactor(client): mark the board header's button role as an expected type error

Elian Dorane041a06d076a
diff --git a/apps/client/src/widgets/collections/board/column.tsx b/apps/client/src/widgets/collections/board/column.tsx
index 302ff556b6..1ff55ebcad 100644
--- a/apps/client/src/widgets/collections/board/column.tsx
+++ b/apps/client/src/widgets/collections/board/column.tsx
@@ -725,7 +725,8 @@ export default function Column({
className={`${isEditing ? "editing" : ""}`}
// A collapsed header opens the column, so it is announced as a button. Open, it
// is a heading, and Space collapses it as a board shortcut like F2.
- role={(isCollapsed ? "button" : undefined) as "heading" | undefined}
+ // @ts-expect-error Preact allows no `button` role on a heading element.
+ role={isCollapsed ? "button" : undefined}
aria-expanded={isCollapsed ? false : undefined}
aria-keyshortcuts="Space"
onContextMenu={openMenu}