Skip to content

Commit 442e2f2

Browse files
authored
fix: aria-label 수정 (#164)
* fix: 누락된 aria-label 추가 * fix: 부적절하게 사용된 aria-label 수정 * fix: 불필요한 aria-label 삭제
1 parent 26ee31c commit 442e2f2

33 files changed

+34
-50
lines changed

src/components/ConfirmModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const ConfirmModal = ({
3737
type="button"
3838
className="body-m secondary-btn h-10 flex-1 basis-1/2"
3939
onClick={onCancel}
40+
aria-label={`${cancelText} 버튼`}
4041
>
4142
{cancelText}
4243
</button>
@@ -45,6 +46,7 @@ const ConfirmModal = ({
4546
className="primary-btn body-m h-10 flex-1 basis-1/2"
4647
disabled={confirmDisabled}
4748
onClick={onConfirm}
49+
aria-label={`${confirmText} 버튼`}
4850
>
4951
{confirmText}
5052
</button>

src/components/MessageModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ const MessageModal = ({
4444
type="button"
4545
className="body-m secondary-btn h-10 flex-1 basis-1/2"
4646
onClick={onCancel}
47+
aria-label={`${cancelText} 버튼`}
4748
>
4849
{cancelText}
4950
</button>
5051
<button
5152
type="button"
5253
className="primary-btn body-m h-10 flex-1 basis-1/2"
5354
onClick={onComplete}
55+
aria-label={`${completeText} 버튼`}
5456
>
5557
{completeText}
5658
</button>

src/components/ReportModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const ReportModal = ({ reportType, letterId, onClose }: ReportModalProps) => {
7474
postReportRequest.reasonType === reason.type && 'bg-primary-2',
7575
)}
7676
onClick={() => handleReasonClick(reason.type)}
77+
aria-label={`신고 사유: ${reason.name}`}
7778
>
7879
{reason.name}
7980
</button>

src/pages/Admin/Filtering.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export default function FilteringManage() {
4141
onClick={() => {
4242
setAddInputShow(true);
4343
}}
44-
aria-label="추가하기"
4544
>
4645
<AddIcon className="h-4 w-4" />
4746
</button>

src/pages/Admin/RollingPaper.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export default function AdminRollingPaper() {
3939
type="button"
4040
className="ml-auto flex items-center gap-2 rounded-md text-black"
4141
onClick={() => setActiveModal(true)}
42-
aria-label='롤링페이퍼 생성하기'
4342
>
4443
<AddIcon />
4544
롤링페이퍼 생성

src/pages/Admin/components/AddRollingPaperModal.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,10 @@ export default function AddRollingPaperModal({ currentPage, onClose }: AddRollin
6464
type="button"
6565
className="secondary-btn text-gray-80 body-m flex-1 basis-1/2 px-3 py-2"
6666
onClick={onClose}
67-
aria-label="취소하기"
6867
>
6968
취소하기
7069
</button>
71-
<button
72-
type="submit"
73-
className="primary-btn body-m flex-1 basis-1/2 px-3 py-2"
74-
aria-label="생성하기"
75-
>
70+
<button type="submit" className="primary-btn body-m flex-1 basis-1/2 px-3 py-2">
7671
생성하기
7772
</button>
7873
</section>

src/pages/Admin/components/FilterTextItem.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export default function FilterTextItem({
7777
<DeleteIcon className="h-5 w-5" />
7878
</button>
7979

80-
<button onClick={() => handlePatchBadWordsUsed(badWord.id, badWord.isUsed)}>
80+
<button
81+
onClick={() => handlePatchBadWordsUsed(badWord.id, badWord.isUsed)}
82+
aria-label={badWord.isUsed === 'true' ? '비속어 사용 활성화' : '비속어 사용 비활성화'}
83+
>
8184
{badWord.isUsed === 'true' ? (
8285
<ToggleOn className="h-5 w-5" />
8386
) : (

src/pages/Admin/components/MenuModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default function MenuModal({
3838
content.onClick();
3939
setModalOpen(false);
4040
}}
41+
aria-label={content.title}
4142
>
4243
{content.title}
4344
</button>

src/pages/Admin/components/PagenationNavigation.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export default function PagenationNavigation({
7575
onClick={() => {
7676
handlePageButtonClick(num);
7777
}}
78+
aria-label={`${num} 페이지로 이동`}
79+
aria-current={nowPageNumberAt === num ? 'page' : undefined}
7880
>
7981
{num}
8082
</button>
@@ -86,7 +88,7 @@ export default function PagenationNavigation({
8688
onClick={() => {
8789
handleNextButtonClick();
8890
}}
89-
aria-label="다음으로"
91+
aria-label="다음 페이지로"
9092
>
9193
next
9294
</button>

src/pages/Admin/components/ReportHandlingModal.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export default function ReportHandlingModal({
5454
onClick={() => {
5555
setHandleModalOpen(false);
5656
}}
57-
aria-label="취소"
5857
>
5958
취소
6059
</button>
@@ -67,7 +66,6 @@ export default function ReportHandlingModal({
6766
handleDeleteList(selectedReportId);
6867
setHandleModalOpen(false);
6968
}}
70-
aria-label="전송"
7169
>
7270
전송
7371
</button>

0 commit comments

Comments
 (0)