-
Notifications
You must be signed in to change notification settings - Fork 0
Test: 네비게이션 검증 test 추가 #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9a18470
8ea8bef
5da5a30
4bcfa6c
ec1413c
89d99f2
52ae8ca
331d9b7
a4f1f71
0dbb8b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,33 +29,34 @@ const NavbarMain = () => { | |||||||||||||
| isMenuOpen ? styles.navHomeStyleOpen : styles.navHomeStyleClose, | ||||||||||||||
| )} | ||||||||||||||
| > | ||||||||||||||
| <Link href={PATH.HOME}> | ||||||||||||||
| <Link href={PATH.HOME} tabIndex={0}> | ||||||||||||||
| <Logo /> | ||||||||||||||
| </Link> | ||||||||||||||
| <div className={styles.navWrapper}> | ||||||||||||||
| <ul className={styles.navList}> | ||||||||||||||
| <li> | ||||||||||||||
| <Link href={PATH.EXPLORE} className={styles.buttonStyle}> | ||||||||||||||
| <Link href={PATH.EXPLORE} className={styles.buttonStyle} tabIndex={0}> | ||||||||||||||
| 탐색 | ||||||||||||||
| </Link> | ||||||||||||||
| </li> | ||||||||||||||
| <li> | ||||||||||||||
| <Link href={PATH.MY_CAPSULE} className={styles.buttonStyle}> | ||||||||||||||
| <Link href={PATH.MY_CAPSULE} className={styles.buttonStyle} tabIndex={0}> | ||||||||||||||
| 내 캡슐 | ||||||||||||||
| </Link> | ||||||||||||||
| </li> | ||||||||||||||
| <li> | ||||||||||||||
| <Link href={PATH.SETTING} className={styles.buttonStyle}> | ||||||||||||||
| <Link href={PATH.SETTING} className={styles.buttonStyle} tabIndex={0}> | ||||||||||||||
| 설정 | ||||||||||||||
| </Link> | ||||||||||||||
| </li> | ||||||||||||||
| </ul> | ||||||||||||||
| <Link href={PATH.SEARCH} className={styles.searchButtonStyle}> | ||||||||||||||
| <Link href={PATH.SEARCH} className={styles.searchButtonStyle} tabIndex={0}> | ||||||||||||||
| <SearchIcon width={"2rem"} height={"2rem"} /> | ||||||||||||||
| </Link> | ||||||||||||||
|
Comment on lines
+53
to
55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 아이콘 전용 검색 링크에 접근 가능한 이름 추가 필수. 시각적 텍스트가 없으므로 스크린 리더에 ‘검색’으로 읽히도록 -<Link href={PATH.SEARCH} className={styles.searchButtonStyle} tabIndex={0}>
+<Link href={PATH.SEARCH} className={styles.searchButtonStyle} aria-label="검색">
<SearchIcon width={"2rem"} height={"2rem"} />
</Link>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| <HamburgerMenuButton | ||||||||||||||
| isMenuOpen={isMenuOpen} | ||||||||||||||
| onClick={handleMenuClick} | ||||||||||||||
| tabIndex={0} | ||||||||||||||
| /> | ||||||||||||||
| </div> | ||||||||||||||
| </nav> | ||||||||||||||
|
|
@@ -72,6 +73,7 @@ const NavbarMain = () => { | |||||||||||||
| href={PATH.EXPLORE} | ||||||||||||||
| className={styles.menuItem} | ||||||||||||||
| onClick={handleMenuClick} | ||||||||||||||
| tabIndex={isMenuOpen ? 0 : -1} | ||||||||||||||
| > | ||||||||||||||
| 탐색 | ||||||||||||||
| </Link> | ||||||||||||||
|
|
@@ -81,6 +83,7 @@ const NavbarMain = () => { | |||||||||||||
| href={PATH.MY_CAPSULE} | ||||||||||||||
| className={styles.menuItem} | ||||||||||||||
| onClick={handleMenuClick} | ||||||||||||||
| tabIndex={isMenuOpen ? 0 : -1} | ||||||||||||||
| > | ||||||||||||||
| 내 캡슐 | ||||||||||||||
| </Link> | ||||||||||||||
|
|
@@ -90,6 +93,7 @@ const NavbarMain = () => { | |||||||||||||
| href={PATH.SETTING} | ||||||||||||||
| className={styles.menuItem} | ||||||||||||||
| onClick={handleMenuClick} | ||||||||||||||
| tabIndex={isMenuOpen ? 0 : -1} | ||||||||||||||
| > | ||||||||||||||
| 설정 | ||||||||||||||
| </Link> | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CTA를 Link로 바꾼 뒤 테스트 쿼리(role=button)와 불일치합니다
현재 CTA는 Next.js
<Link>로 변경되어 ARIA role이 "link"입니다. 반면 본 PR에 포함된 e2e/헬퍼는"button"역할로 쿼리하고 있어 실패합니다. 네비게이션 목적의 요소는 링크가 맞으니 컴포넌트를 다시 버튼으로 되돌리기보다는 테스트/헬퍼 쪽을"link"로 정정하는 것을 권장합니다. 관련 수정 제안을 tests/navigation.spec.ts 및 tests/utils/test-helpers.ts 코멘트에 첨부했습니다.