라디오 버튼
라디오 버튼 (Radios)
라디오 버튼(Radios) 컴포넌트는 사용자가 목록에서 단 하나의 옵션만 선택해야 할 때 사용해요. 선택지가 서로 겹치지 않고 딱 하나만 고르는 상황에 딱 맞는 컴포넌트랍니다.
출처: 문서
본문
어떤 때 사용하나요
사용자가 목록에서 단 하나의 옵션만 선택할 수 있을 때 라디오 버튼 컴포넌트를 사용하세요.
어떤 때 사용하지 말아야 하나요
사용자가 두 개 이상의 옵션을 선택해야 할 수도 있다면 라디오 버튼 컴포넌트를 사용하지 마세요. 이 경우에는 체크박스(Checkboxes) 컴포넌트를 사용해야 해요.
어떻게 동작하나요
항상 라디오 버튼을 라벨의 왼쪽에 배치하세요. 이렇게 하면 특히 화면 확대 도구를 사용하는 사용자들이 라디오 버튼을 더 쉽게 찾을 수 있어요.
체크박스와 달리, 사용자는 라디오 버튼 목록에서 단 하나의 옵션만 선택할 수 있어요. 사용자가 라디오 버튼과 체크박스의 시각적 차이만으로 몇 개의 옵션을 선택할 수 있는지 알 수 있다고 가정하지 마세요.
필요하다면 이 점을 설명하는 힌트를 추가하세요. 예를 들어 ‘하나의 옵션을 선택하세요’ 같은 문구요.
라디오 옵션을 미리 선택하지 마세요. 미리 선택하면 사용자가:
- 질문을 놓쳤다는 사실을 깨닫지 못할 가능성이 높아요
- 잘못된 답변을 제출할 가능성이 높아요
사용자가 옵션을 하나 선택한 후에는 브라우저 창을 새로 고침하지 않는 한 선택하지 않은 상태로 되돌아갈 수 없어요. 따라서 ‘해당 없음’이나 ‘모르겠음’이 유효한 옵션이라면 이를 포함해야 해요.
라디오 옵션은 기본적으로 알파벳순으로 정렬하세요.
경우에 따라 옵션을 가장 흔한 것부터 가장 덜 흔한 것 순서로 정렬하는 것이 도움이 될 수도 있어요. 예를 들어 ‘어디에 사세요?’의 옵션을 인구 규모에 따라 정렬할 수 있죠.
다만 이렇게 하는 것은 서비스에 편향을 강화할 수 있으므로 각별히 주의해서 해야 해요. 확신이 서지 않는다면 알파벳순으로 정렬하세요.
이 페이지의 예시에 나온 것처럼, 라디오 버튼을 이들을 설명하는 <fieldset>과 함께 <legend> 안에 그룹으로 묶으세요. 이는 보통 ‘어디에 사세요?’ 같은 질문이에요.
페이지에서 하나의 질문만 묻는 경우
권장대로 서비스에서 페이지당 질문을 하나만 묻는다면, <legend>의 내용을 페이지 제목으로 설정할 수 있어요. 이것은 좋은 관행인데, 화면 읽기 도구 사용자가 그 내용을 한 번만 듣게 되기 때문이에요.
legend를 제목으로 설정하는 이유와 방법에 대해 자세히 알아보세요.
라디오 버튼 컴포넌트를 사용하는 방법은 2가지가 있어요. HTML을 직접 사용할 수도 있고, Nunjucks나 GOV.UK Prototype Kit을 사용한다면 Nunjucks 매크로를 쓸 수도 있어요.
페이지에서 두 개 이상의 질문을 묻는 경우
페이지에서 두 개 이상의 질문을 묻는다면, <legend>의 내용을 페이지 제목으로 설정하지 마세요. Question pages에서 여러 질문을 묻는 방법에 대해 자세히 알아보세요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend">
Where do you live?
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive" name="whereDoYouLive" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-2" name="whereDoYouLive" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-3" name="whereDoYouLive" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-4" name="whereDoYouLive" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
인라인 라디오 버튼 (Inline radios)
경우에 따라 라디오 버튼을 서로 옆에 ‘인라인’(가로 방향)으로 표시하도록 선택할 수 있어요.
인라인 라디오 버튼은 다음 경우에만 사용하세요:
- 질문에 옵션이 두 개뿐일 때
- 두 옵션 모두 짧을 때
모바일 기기 같은 작은 화면에서는 라디오 버튼이 여전히 위아래로 ‘쌓여서’(세로 방향) 표시된다는 점을 기억하세요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="changedName-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Have you changed your name?
</h1>
</legend>
<div id="changedName-hint" class="govuk-hint">
This includes changing your last name or spelling your name differently
</div>
<div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName" name="changedName" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="changedName">
Yes
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName-2" name="changedName" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="changedName-2">
No
</label>
</div>
</div>
</fieldset>
</div>
힌트가 있는 라디오 항목 (Radio items with hints)
라디오 항목에 힌트를 추가해서 옵션에 대한 추가 정보를 제공할 수 있어요.
각 힌트는 마침표 없이 짧은 문장 하나로 유지하세요. 화면 읽기 도구는 사용자가 항목과 상호작용할 때 전체 텍스트를 읽어 줄 텐데, 텍스트가 길면 사용자를 답답하게 만들 수 있어요.
힌트 텍스트에는 링크를 사용하지 마세요. 화면 읽기 도구는 항목을 설명할 때 링크 텍스트를 읽어 주기는 하지만, 보통 사용자에게 그 텍스트가 링크라는 것을 알려주지 않아요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="signIn-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How do you want to sign in?
</h1>
</legend>
<div id="signIn-hint" class="govuk-hint">
You’ll need an account to prove your identity and complete your Self Assessment
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="signIn" name="signIn" type="radio" value="government-gateway" aria-describedby="signIn-item-hint">
<label class="govuk-label govuk-radios__label" for="signIn">
Sign in with Government Gateway
</label>
<div id="signIn-item-hint" class="govuk-hint govuk-radios__hint">
You’ll have a user ID if you’ve registered for Self Assessment or filed a tax return online before
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="signIn-2" name="signIn" type="radio" value="govuk-one-login" aria-describedby="signIn-2-item-hint">
<label class="govuk-label govuk-radios__label" for="signIn-2">
Sign in with GOV.UK One Login
</label>
<div id="signIn-2-item-hint" class="govuk-hint govuk-radios__hint">
If you don’t have a GOV.UK One Login, you can create one
</div>
</div>
</div>
</fieldset>
</div>
텍스트 구분선이 있는 라디오 항목 (Radio items with a text divider)
라디오 옵션 중 하나 이상이 나머지와 다르다면, 텍스트 구분선으로 분리하면 사용자에게 도움이 될 수 있어요. 그 텍스트는 보통 ‘or’(또는)라는 단어예요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Where do you live?
</h1>
</legend>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive" name="whereDoYouLive" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-2" name="whereDoYouLive" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-3" name="whereDoYouLive" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-4" name="whereDoYouLive" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-4">
Northern Ireland
</label>
</div>
<div class="govuk-radios__divider">or</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-6" name="whereDoYouLive" type="radio" value="abroad">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-6">
I am a British citizen living abroad
</label>
</div>
</div>
</fieldset>
</div>
관련 질문을 조건부로 보여주기 (Conditionally revealing a related question)
사용자가 특정 라디오 옵션을 선택했을 때 관련 질문을 물어보게 할 수 있어요. 이렇게 하면 사용자가 그 질문을 자신과 관련이 있을 때만 보게 돼요.
이 방법은 두 개의 관련 질문을 같은 페이지에 그룹화해서 더 쉽게 답할 수 있게 만들 수도 있어요. 예를 들어 사용자가 ‘전화로 연락해 주세요’ 옵션을 선택했을 때 전화번호 입력란을 보여줄 수 있죠.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="contact-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How would you prefer to be contacted?
</h1>
</legend>
<div id="contact-hint" class="govuk-hint">
Select one option
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact" name="contact" type="radio" value="email" data-aria-controls="conditional-contact">
<label class="govuk-label govuk-radios__label" for="contact">
Email
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-contact">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-email">
Email address
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-email" name="contactByEmail" type="email" spellcheck="false" autocomplete="email">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact-2" name="contact" type="radio" value="phone" data-aria-controls="conditional-contact-2">
<label class="govuk-label govuk-radios__label" for="contact-2">
Phone
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-contact-2">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-phone">
Phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-phone" name="contactByPhone" type="tel" autocomplete="tel">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact-3" name="contact" type="radio" value="text" data-aria-controls="conditional-contact-3">
<label class="govuk-label govuk-radios__label" for="contact-3">
Text message
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-contact-3">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-text">
Mobile phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-text" name="contactByText" type="tel" autocomplete="tel">
</div>
</div>
</div>
</fieldset>
</div>
간단하게 유지하세요. 관련 질문이 복잡하거나 부분이 두 개 이상이라면, 프로세스의 다음 페이지에서 보여주세요.
인라인 라디오 버튼(예: 옆에 놓인 ‘yes’와 ‘no’ 옵션)에는 질문을 조건부로 보여주지 마세요.
질문만 조건부로 보여주세요. 질문이 아닌 다른 것은 보여주거나 숨기지 마세요.
알려진 문제점
조건부로 보여지는 질문이 표시되거나 숨겨질 때 사용자에게 항상 알림이 가는 것은 아니에요. 이는 WCAG 2.2 성공 기준 4.1.2 이름(Name), 역할(Role), 값(Value)을 충족하지 못해요.
다만 우리는 화면 읽기 도구 사용자들이 조건부로 보여지는 질문에 답하는 데 어려움을 겪지 않는다는 것을 발견했어요. 단, 질문이 간단하게 유지되는 한 말이죠. 우리가 테스트한 사용자들은 복잡한 질문, 특히 부분이 두 개 이상인 질문이 조건부로 보여질 때 혼란을 겪었어요.
우리는 조건부로 보여지는 질문이 서비스에서 어떻게 사용될 수 있는지 더 배울 기회를 계속 찾을 거예요.
작은 라디오 버튼 (Smaller radios)
거의 모든 경우에는 표준 크기의 라디오 버튼을 사용하세요. 다만 더 작은 버전은 시각적으로 덜 눈에 띄게 만드는 것이 도움이 되는 페이지에서 잘 작동해요.
예를 들어 검색 결과 페이지에서는 사용자의 주요 필요가 결과를 보는 것이에요. 작은 라디오 버튼을 사용하면 사용자가 본문 내용에서 주의를 빼앗기지 않고 검색 필터를 보고 변경할 수 있어요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
<h1 class="govuk-fieldset__heading">
Filter
</h1>
</legend>
<div class="govuk-radios govuk-radios--small" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName" name="changedName" type="radio" value="month">
<label class="govuk-label govuk-radios__label" for="changedName">
Monthly
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName-2" name="changedName" type="radio" value="year">
<label class="govuk-label govuk-radios__label" for="changedName-2">
Yearly
</label>
</div>
</div>
</fieldset>
</div>
작은 라디오 버튼은 사건 처리(caseworking) 시스템처럼 반복 사용을 위해 설계된 서비스의 정보 밀도가 높은 화면에서 잘 작동할 수 있어요.
이런 서비스에서는 사용자가 화면을 여러 번 다시 방문하기 때문에 라디오 버튼이 눈에 띄지 않을 위험이 더 낮아요.
오류 메시지
사용자가 다음을 하지 않은 경우 오류 메시지를 표시하세요:
- 라디오 버튼을 아무것도 선택하지 않음
- 조건부로 보여지는 질문에 답하지 않음
오류 메시지는 다음과 같은 스타일이어야 해요:
<div class="govuk-form-group govuk-form-group--error">
<fieldset class="govuk-fieldset" aria-describedby="whereDoYouLive-error">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
Where do you live?
</h1>
</legend>
<p id="whereDoYouLive-error" class="govuk-error-message">
<span class="govuk-visually-hidden">Error:</span> Select the country where you live
</p>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive" name="whereDoYouLive" type="radio" value="england">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive">
England
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-2" name="whereDoYouLive" type="radio" value="scotland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-2">
Scotland
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-3" name="whereDoYouLive" type="radio" value="wales">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-3">
Wales
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="whereDoYouLive-4" name="whereDoYouLive" type="radio" value="northern-ireland">
<label class="govuk-label govuk-radios__label" for="whereDoYouLive-4">
Northern Ireland
</label>
</div>
</div>
</fieldset>
</div>
오류가 Error message 컴포넌트의 안내를 따르고, 특정 오류 상태에 대해 특정 오류 메시지를 갖도록 하세요.
‘yes’ 또는 ‘no’ 질문인 경우
‘[무엇이 사실이라면]이면 yes를 선택하세요’라고 말하세요. 예를 들어, ‘Sarah가 평소에 당신과 함께 산다면 yes를 선택하세요’처럼요.
‘yes’와 ‘no’가 아닌 두 개의 옵션이 있는 경우
‘[그것]이면 선택하세요’라고 말하세요. 예를 들어, ‘취업자 또는 자영업자라면 선택하세요’처럼요.
옵션이 두 개보다 많은 경우
‘[그것]을 선택하세요’라고 말하세요. 예를 들어, ‘집세를 내는 요일을 선택하세요’처럼요.
조건부로 보여지는 질문인 경우
초기 질문과 명확히 관련된 Error message 컴포넌트를 포함하세요.
<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="contact-hint">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
How would you prefer to be contacted?
</h1>
</legend>
<div id="contact-hint" class="govuk-hint">
Select one option
</div>
<div class="govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact" name="contact" type="radio" value="email" checked data-aria-controls="conditional-contact">
<label class="govuk-label govuk-radios__label" for="contact">
Email
</label>
</div>
<div class="govuk-radios__conditional" id="conditional-contact">
<div class="govuk-form-group govuk-form-group--error">
<label class="govuk-label" for="contact-by-email">
Email address
</label>
<p id="contact-by-email-error" class="govuk-error-message">
<span class="govuk-visually-hidden">Error:</span> Email address cannot be blank
</p>
<input class="govuk-input govuk-!-width-one-half govuk-input--error" id="contact-by-email" name="contactByEmail" type="email" spellcheck="false" aria-describedby="contact-by-email-error" autocomplete="email">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact-2" name="contact" type="radio" value="phone" data-aria-controls="conditional-contact-2">
<label class="govuk-label govuk-radios__label" for="contact-2">
Phone
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-contact-2">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-phone">
Phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-phone" name="contactByPhone" type="tel" autocomplete="tel">
</div>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="contact-3" name="contact" type="radio" value="text" data-aria-controls="conditional-contact-3">
<label class="govuk-label govuk-radios__label" for="contact-3">
Text message
</label>
</div>
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-contact-3">
<div class="govuk-form-group">
<label class="govuk-label" for="contact-by-text">
Mobile phone number
</label>
<input class="govuk-input govuk-!-width-one-third" id="contact-by-text" name="contactByText" type="tel" autocomplete="tel">
</div>
</div>
</div>
</fieldset>
</div>
이 컴포넌트에 대한 연구
조건부로 보여지는 질문, 특히 보조 기술을 사용하는 사용자와 관련된 사용자 연구를 했다면, 이 컴포넌트에 대한 토론에 댓글을 달아 배운 점을 알려주세요.
2016년에 라디오 버튼과 체크박스 컴포넌트 업데이트에 관한 블로그 게시물을 읽어보세요.
최근 변경 사항
| 날짜 | 변경 | 설명 |
| Jun 2026 | GOV.UK Frontend v6.3.0 | 작은 인라인 라디오 버튼의 라벨 텍스트가 불필요하게 줄바꿈되던 문제를 고쳤어요. |
| Jan 2026 | GOV.UK Frontend v5.14.0 | 작은 라디오 버튼이 hover와 focus 상태가 동시에일 때 focus 스타일이 렌더링되지 않던 문제를 고쳤어요. |
| Sept 2025 | GOV.UK Frontend v5.12.0 | 조건부로 보여지는 콘텐츠의 강제 들여쓰기 제거 후속 작업으로, 라디오를 fieldset과 함께 사용할 때 HTML이 여전히 들여쓰기되는 문제를 고쳤어요. |
| Jul 2024 | GOV.UK Frontend v5.4.1 | 조건부로 보여지는 콘텐츠가 부모 라디오 버튼과 정렬되지 않던 문제를 고쳤어요. |
| Apr 2024 | GOV.UK Frontend v5.3.1 | textarea 요소 같은 공백에 민감한 콘텐츠의 렌더링 문제 때문에 조건부로 보여지는 콘텐츠의 강제 들여쓰기를 제거했어요. |
이 컴포넌트 개선에 도움 주기
이 페이지가 유용하고, 관련성이 있으며, 최신 상태로 유지되도록 하려면 다음을 할 수 있어요:
- GitHub의 ‘Radios’ 토론에 참여해서 연구 내용을 공유하기
- GitHub에서 변경 제안하기 – GitHub에서 변경 사항을 제안하는 방법에 대해 자세히 알아보기