Skip to content

Commit

Permalink
refactor: 방설정 모달 라운드, 제한 시간 설정 접근성 개선 #336
Browse files Browse the repository at this point in the history
  • Loading branch information
useon committed Oct 20, 2024
1 parent e886b40 commit 34fe4bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const RoomSettingContainer = ({
<span css={roomSettingTitle}>{title}</span>
</div>
{title === '카테고리' && children}
{title !== '카테고리' && <ul css={roomSettingButtonContainer}>{children}</ul>}
{title !== '카테고리' && (
<ul css={roomSettingButtonContainer} role="radiogroup">
{children}
</ul>
)}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ const RoomSettingModal = ({ isOpen, onClose }: RoomSettingModalProps) => {
<RoomSettingContainer title="총 라운드">
{TOTAL_ROUND_LIST.map((round) => (
<li key={round}>
<button css={roomSettingButton(totalRound === round)} onClick={handleClickRound}>
<button
role="radio"
onClick={handleClickRound}
aria-checked={totalRound === round}
css={roomSettingButton(totalRound === round)}
>
{round}
</button>
</li>
Expand All @@ -54,9 +59,11 @@ const RoomSettingModal = ({ isOpen, onClose }: RoomSettingModalProps) => {
{TIMER_PER_ROUND_LIST.map((timeLimit) => (
<li key={timeLimit}>
<button
css={roomSettingButton(timeLimitPerRound === timeLimit)}
role="radio"
onClick={handleClickTimeLimit}
value={timeLimit}
aria-checked={timeLimitPerRound === timeLimit}
css={roomSettingButton(timeLimitPerRound === timeLimit)}
>
{timeLimit / POLLING_DELAY}
</button>
Expand Down

0 comments on commit 34fe4bf

Please sign in to comment.