@@ -58,9 +58,9 @@ function DropdownMenu({ isClicked, setIsClicked }: Props) {
5858 } ;
5959
6060 return (
61- < div
61+ < nav
6262 className = "w-full h-screen bg-secondary absolute top-0 left-0 px-[12px] font-serif block sm:hidden"
63- role = "menu "
63+ role = "navigation "
6464 aria-label = "메인 네비게이션 메뉴"
6565 tabIndex = { - 1 }
6666 id = "mobile-dropdown-menu"
@@ -75,52 +75,53 @@ function DropdownMenu({ isClicked, setIsClicked }: Props) {
7575 className = "w-[62px] md:w-[82px] h-auto"
7676 />
7777 </ div >
78- < div className = "my-5" >
79- < ul className = "flex flex-col gap-[12px] text-black px-2" >
80- { navItem . map ( ( { label, href } , idx ) => (
81- < li
82- className = { `font-normal ${ pathname === href ? 'pl-1' : 'px-3 py-[12px]' } ` }
83- key = { href }
78+ < ul className = "flex flex-col gap-[12px] text-black px-2 my-5" >
79+ { navItem . map ( ( { label, href } , idx ) => (
80+ < li className = { `font-normal ${ pathname === href ? 'pl-1' : 'px-3 py-[12px]' } ` } key = { href } >
81+ < Link
82+ href = { href }
83+ onNavigate = { ( ) => setIsClicked ( false ) }
84+ className = { `items-start ${ pathname === href ? 'bg-tertiary/70 inline-flex pr-5 p-2 rounded-md text-secondary' : 'hover:text-black/70 flex' } ` }
85+ aria-current = { pathname === href ? 'page' : undefined }
8486 >
85- < Link
86- href = { href }
87- onNavigate = { ( ) => setIsClicked ( false ) }
88- className = { `items-start ${ pathname === href ? 'bg-tertiary/70 inline-flex pr-5 p-2 rounded-md text-secondary' : 'hover:text-black/70 flex' } ` }
89- aria-current = { pathname === href ? 'page' : undefined }
87+ < span className = "text-[20px] mr-3" > { idx + 1 } . </ span >
88+ < span
89+ className = "text-[28px]"
90+ ref = { ( el ) => {
91+ textRef . current [ idx ] = el ;
92+ } }
93+ onMouseEnter = { ( ) => handleMouseEnter ( idx ) }
94+ onMouseLeave = { ( ) => handleMouseLeave ( idx ) }
9095 >
91- < span className = "text-[20px] mr-3" > { idx + 1 } . </ span >
92- < span
93- className = "text-[28px]"
94- ref = { ( el ) => {
95- textRef . current [ idx ] = el ;
96- } }
97- onMouseEnter = { ( ) => handleMouseEnter ( idx ) }
98- onMouseLeave = { ( ) => handleMouseLeave ( idx ) }
99- >
100- { label }
101- </ span >
102- </ Link >
103- </ li >
104- ) ) }
105- </ ul >
106- </ div >
107- < div className = "border border-t-[1px] border-t-gray flex items-center py-[32px] gap-2" >
96+ { label }
97+ </ span >
98+ </ Link >
99+ </ li >
100+ ) ) }
101+ </ ul >
102+
103+ < section
104+ aria-label = "로그인 로그아웃"
105+ className = "border border-t-[1px] border-t-gray flex items-center py-[32px] gap-2"
106+ >
108107 < User color = "var(--color-primary)" />
109108 < button type = "button" className = "text-black font-light text-xl hover:text-black/70" >
110109 로그인/회원가입
111110 </ button >
112- </ div >
111+ </ section >
112+
113113 < div className = "absolute top-1.5 left-3" >
114114 < button
115115 type = "button"
116+ aria-label = "모바일 메뉴 닫기"
116117 onClick = { ( ) => {
117118 setIsClicked ( false ) ;
118119 } }
119120 >
120121 < Close color = "var(--color-primary)" className = "w-8 h-8" />
121122 </ button >
122123 </ div >
123- </ div >
124+ </ nav >
124125 ) ;
125126}
126127
0 commit comments