Skip to content

Commit 0077e9d

Browse files
committed
refactor: 네비게이션 접근성 개선
1 parent 35a93d9 commit 0077e9d

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

packages/view/src/App.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const App = () => {
7171
<BranchSelector />
7272
<RefreshButton />
7373
<button
74+
type="button"
7475
className="folder-activity-flow-button"
7576
onClick={handleOpenFolderActivityFlowModal}
7677
>
@@ -101,12 +102,23 @@ const App = () => {
101102
<div
102103
className="folder-activity-flow-modal"
103104
onClick={handleCloseFolderActivityFlowModal}
105+
onKeyDown={(e) => {
106+
if (e.key === 'Escape') {
107+
handleCloseFolderActivityFlowModal();
108+
}
109+
}}
110+
role="button"
111+
tabIndex={0}
104112
>
105113
<div
106114
className="folder-activity-flow-modal-content"
107115
onClick={(e) => e.stopPropagation()}
116+
onKeyDown={(e) => e.stopPropagation()}
117+
role="dialog"
118+
tabIndex={-1}
108119
>
109120
<button
121+
type="button"
110122
className="folder-activity-flow-modal-close"
111123
onClick={handleCloseFolderActivityFlowModal}
112124
>

packages/view/src/components/FolderActivityFlow/FolderActivityFlow.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const FolderActivityFlow = () => {
118118
</div>
119119
</div>
120120
<button
121+
type="button"
121122
className="folder-activity-flow__mode-toggle"
122123
onClick={toggleMode}
123124
style={{
@@ -142,13 +143,22 @@ const FolderActivityFlow = () => {
142143
<span
143144
className={index === getBreadcrumbs().length - 1 ? "current" : "clickable"}
144145
onClick={() => navigateToBreadcrumb(index, getBreadcrumbs().length)}
146+
onKeyDown={(e) => {
147+
if (e.key === 'Enter' || e.key === ' ') {
148+
e.preventDefault();
149+
navigateToBreadcrumb(index, getBreadcrumbs().length);
150+
}
151+
}}
152+
role="button"
153+
tabIndex={index === getBreadcrumbs().length - 1 ? -1 : 0}
145154
>
146155
{crumb}
147156
</span>
148157
</span>
149158
))}
150159
{currentPath !== "" && (
151160
<button
161+
type="button"
152162
className="folder-activity-flow__back-btn"
153163
onClick={navigateUp}
154164
>

0 commit comments

Comments
 (0)