Skip to content

Commit

Permalink
refactor: 게임 화면에서 선택지를 선택하는 기능에 적절한 role과 속성을 추가하여 개선 #361
Browse files Browse the repository at this point in the history
  • Loading branch information
useon committed Oct 21, 2024
1 parent 92ddf87 commit 68f672a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SelectContainer = () => {
isVoted={selectedOption.isCompleted}
completeSelection={completeSelection}
/>
<section css={selectSection}>
<section role="radiogroup" css={selectSection}>
<SelectOption
option={balanceContent.firstOption}
selectedOption={selectedOption}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/SelectOption/SelectOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ const SelectOption = ({ option, selectedOption, handleClickOption }: SelectOptio

return (
<button
role="radio"
css={SelectOptionLayout(selectedId === option.optionId, isCompleted)}
onClick={() => handleClickOption(option.optionId)}
disabled={isCompleted}
aria-pressed={selectedId === option.optionId}
aria-checked={selectedId === option.optionId}
>
{option.name}
</button>
Expand Down

0 comments on commit 68f672a

Please sign in to comment.