[사전 미션 - 워밍업] - 잭슨(김진서) 미션 제출합니다. #55
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
사전 미션 목표
해결 과정
Step 1: 언어 설정하기
Step 2: 시맨틱 태그 사용하기
Step 3: 버튼 접근성 향상시키기
aria-label속성을 추가하고, disabled 상태일 때 스타일을 추가하였습니다.aria-label속 텍스트를 읽음으로써 버튼의 정확한 동작을 제시합니다. ex) 하이픈, 버튼, 빼기 -> 성인 승객 감소, 버튼Step 4: 변경 사항에 대한 실시간 알림 추가하기
aria-live속성을 추가했습니다.aria-live: 'polite': 다른 설명을 읽고 나서 숫자를 읽어줌(순차적)aria-live: 'assertive': 다른 설명을 다 읽기 전에 먼저 숫자를 읽어줌(순서를 기다리지 않음)Step 5: 최소/최대 값 도달 시 상태 메시지 알림 추가하기
feat: 성인 승객 수 조절 시 상태 메시지 추가 및 시각적으로 숨겨진 요소 구현 statusMessage 상태를 추가해 최소/최대 값 도달 시 상태 메시지를 읽습니다.
statusMessage에
role="status"속성을 추가해 상태 메시지용 라이브 영역임을 표시했습니다. 기본적으로 aria-live="polite"가 내재되어 있어, 화면 낭독기가 해당 영역의 변화(텍스트 업데이트)를 감지해 조용히 안내합니다(현재 읽고 있던 음성을 중단하지 않음).visually-hidden속성을 이용해 statusMessage를 숨기되 스크린 리더가 읽도록 설정했습니다.