@ehfuse/taskbox 0.5.240 → 0.5.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +2 -2
- package/dist/internal/a11y.d.ts +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 접근성 보조 유틸이다 — 마우스로만 열리던 칸을 키보드로도 열 수 있게 만든다.
|
|
3
|
+
*
|
|
4
|
+
* 업무함 표는 `<table>` 이 아니라 CSS grid 위의 div 다. 그 위에 table 역할(role)을 씌우면
|
|
5
|
+
* 가상화(react-virtuoso)가 끼워 넣는 래퍼 div 때문에 행·셀의 부모-자식 관계가 끊겨
|
|
6
|
+
* 스크린리더가 오히려 더 잘못 읽는다. 그래서 구조 역할은 손대지 않고,
|
|
7
|
+
* **초점(tab)·활성화(Enter/Space)·이름(aria-label)** 세 가지만 붙인다 — 여기서 얻는 것이 가장 크다.
|
|
8
|
+
*/
|
|
9
|
+
import type { KeyboardEvent } from "react";
|
|
10
|
+
/** 키보드로 열 수 있는 칸에 붙일 props 다. */
|
|
11
|
+
export interface InteractiveProps {
|
|
12
|
+
role: "button";
|
|
13
|
+
tabIndex: 0;
|
|
14
|
+
"aria-label": string;
|
|
15
|
+
"aria-haspopup"?: "menu" | "dialog" | "listbox" | "true";
|
|
16
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
/** 칸을 키보드로도 열 수 있게 하는 props 를 만든다(잠긴 칸이면 아무것도 붙이지 않는다). */
|
|
19
|
+
export declare function interactiveProps(options: {
|
|
20
|
+
label: string;
|
|
21
|
+
onActivate: (element: HTMLElement) => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
haspopup?: "menu" | "dialog" | "listbox" | "true";
|
|
24
|
+
}): InteractiveProps | Record<string, never>;
|
|
25
|
+
/** 정렬 상태를 말로 풀어 준다(헤더 이름 뒤에 붙여 읽힌다). */
|
|
26
|
+
export declare function sortStateLabel(sorted: boolean, direction: "asc" | "desc"): string;
|
package/package.json
CHANGED