Skip to content

Commit 8978e5f

Browse files
committed
fix: dashboard 웹 접근성 최적화 추가작업
1 parent 340fb32 commit 8978e5f

File tree

7 files changed

+21
-5
lines changed

7 files changed

+21
-5
lines changed

frontend/src/app/(sidebar)/dashboard/_components/dashboard-table/CategoryFilterHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const CategoryFilterIcon = ({ isOpen }: { isOpen: boolean }) => {
2727

2828
return (
2929
<span
30-
className="inline-flex shrink-0 text-gray-300"
30+
className="inline-flex shrink-0 text-gray-500"
3131
aria-label={isOpen ? "필터 열기" : "필터 닫기"}
3232
>
3333
<Icon aria-hidden="true" />

frontend/src/app/(sidebar)/dashboard/_components/dashboard-table/CategoryPopup.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ const CategoryPopup = ({
6262
return (
6363
<div
6464
ref={popupRef}
65+
role="dialog"
66+
aria-label="카테고리 선택"
6567
className="fixed z-50 w-[288px] rounded-lg border border-border-light bg-white shadow-lg overflow-hidden"
6668
style={{
6769
top: `${position.top}px`,

frontend/src/app/(sidebar)/dashboard/_components/dashboard-table/EditableDataTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const EditableDataTable = ({
8181
columns={columns}
8282
data={sortedRows}
8383
rowKey={rowKey}
84+
aria-label="지출 기록 테이블"
8485
className="flex-1 min-h-0 rounded-t-600 border border-b-0 border-gray-50"
8586
selectedCell={selectedCell}
8687
sortConfig={tableSortConfig}

frontend/src/app/(sidebar)/dashboard/_components/image-modal/PetImageChangeModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default function PetImageChangeModal({
117117
<button
118118
type="button"
119119
onClick={handleOverlayClose}
120-
className="self-end text-gray-400 transition-colors hover:text-gray-700 cursor-pointer"
120+
className="self-end text-gray-500 transition-colors hover:text-gray-700 cursor-pointer"
121121
aria-label="닫기"
122122
>
123123
<CloseIcon className="size-5" aria-hidden="true" />

frontend/src/app/(sidebar)/dashboard/_hooks/useExpenseTableColumns.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import Chip from "@/components/common/Chip/Chip";
1717
import CheckBox from "@/components/common/CheckBox/CheckBox";
1818
import CategoryFilterHeader from "@/app/(sidebar)/dashboard/_components/dashboard-table/CategoryFilterHeader";
1919

20+
const ACCESSOR_LABEL_MAP: Partial<Record<keyof EditableExpenseRow, string>> = {
21+
usage: "사용내역",
22+
cost: "비용",
23+
memo: "메모",
24+
};
25+
2026
/**
2127
* 지출 테이블 컬럼 정의 및 셀 렌더러/에디터 생성 훅
2228
*/
@@ -42,6 +48,7 @@ export const useExpenseTableColumns = ({
4248
) => {
4349
return (
4450
<input
51+
aria-label={ACCESSOR_LABEL_MAP[accessor] ?? String(accessor)}
4552
className="w-full bg-transparent outline-none px-500 py-200 truncate"
4653
value={String(value ?? "")}
4754
onChange={(e) => {
@@ -93,6 +100,7 @@ export const useExpenseTableColumns = ({
93100
<input
94101
type="text"
95102
inputMode="numeric"
103+
aria-label="비용"
96104
className="w-full bg-transparent outline-none px-500 py-200"
97105
value={displayValue}
98106
onChange={(e) => {
@@ -131,6 +139,7 @@ export const useExpenseTableColumns = ({
131139
(_value: EditableExpenseRow[keyof EditableExpenseRow], _row: EditableExpenseRow) => {
132140
return (
133141
<CheckBox
142+
aria-label="행 선택"
134143
isChecked={_row.isSelected}
135144
onChange={() => updateCellByLocalId(_row.localId, "isSelected", !_row.isSelected)}
136145
/>
@@ -147,7 +156,7 @@ export const useExpenseTableColumns = ({
147156
return useMemo(
148157
() => [
149158
{
150-
label: <CheckBox isChecked={isAllSelected} onChange={handleToggleAllCheckBox} />,
159+
label: <CheckBox aria-label="전체 선택" isChecked={isAllSelected} onChange={handleToggleAllCheckBox} />,
151160
accessor: "isSelected" as keyof EditableExpenseRow,
152161
render: createRenderCheckBox,
153162
width: "48px",

frontend/src/components/ui/DataTable/ClientDataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const SortIcon = memo(function SortIcon({ order }: { order: "asc" | "desc" }) {
1616

1717
return (
1818
<span
19-
className="inline-flex shrink-0 text-gray-300"
19+
className="inline-flex shrink-0 text-gray-500"
2020
aria-label={order === "asc" ? "오름차순" : "내림차순"}
2121
>
2222
<Icon aria-hidden="true" />

frontend/src/components/ui/DataTable/DataTableShell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ const DataTableShell = memo(function DataTableShell({
3131
tabIndex={tabIndex}
3232
onKeyDown={onKeyDown}
3333
>
34-
<table className="w-full border-separate border-spacing-0 text-left table-fixed shrink-0">
34+
<table
35+
className="w-full border-separate border-spacing-0 text-left table-fixed shrink-0"
36+
role="presentation"
37+
aria-hidden="true"
38+
>
3539
<colgroup>{colDefs}</colgroup>
3640
{headerSlot}
3741
</table>

0 commit comments

Comments
 (0)