리펙토링: 코드 검토
This commit is contained in:
@@ -53,14 +53,18 @@ export default function VariableChoiceAnswerForm({
|
||||
const selected = activeTermIndex === index;
|
||||
const selectedChoice = getSelectedChoice(index as 0 | 1);
|
||||
const completed = choiceId !== null && selectedChoice !== null;
|
||||
const statusLabel =
|
||||
completed && selectedChoice
|
||||
? `선택값 ${selectedChoice.latex}`
|
||||
: `원래 항 ${pendingChoiceLabels[index]}, 미선택`;
|
||||
|
||||
return (
|
||||
<li
|
||||
key={index}
|
||||
className="min-w-0 flex-1"
|
||||
aria-label={`${index + 1}항 ${
|
||||
completed ? "선택 완료" : "미선택"
|
||||
}${selected ? ", 현재 선택 중" : ""}`}
|
||||
aria-label={`${index + 1}항 ${statusLabel}${
|
||||
selected ? ", 현재 선택 중" : ""
|
||||
}`}
|
||||
>
|
||||
<span
|
||||
className={`block truncate text-center text-xs font-bold ${
|
||||
|
||||
Reference in New Issue
Block a user