Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Radio to be label-free #1734

Closed
Tracked by #1800
sungik-choi opened this issue Nov 16, 2023 · 1 comment · Fixed by #1943
Closed
Tracked by #1800

Enhance Radio to be label-free #1734

sungik-choi opened this issue Nov 16, 2023 · 1 comment · Fixed by #1943
Assignees
Labels
enhancement Issues or PR related to making existing features better

Comments

@sungik-choi
Copy link
Contributor

Description

Radio 컴포넌트를 라벨없이 사용할 수 있도록 개선합니다.

Reasons for suggestion

디자인에서 Radio 가 라벨 없이 단독으로 사용될 경우가 있습니다.

Proposed solution

  • Radio 를 단독으로 사용할 수 있도록 합니다.
  • 이 경우, 장식 요소로서 사용되는 것이기 때문에 마크업에서 radio button으로 다뤄지면 안됩니다. RadioGroup 의 컨텍스트 존재 여부를 파악하여 의미를 가지지 않은 요소(div)로 렌더되도록 처리되어야 합니다.
  • 구현이 완료되면 LegacyRadio 를 제거할 준비가 끝납니다!

References

No response

@sungik-choi sungik-choi added the enhancement Issues or PR related to making existing features better label Nov 16, 2023
@sungik-choi sungik-choi mentioned this issue Dec 15, 2023
@sungik-choi
Copy link
Contributor Author

장식 요소로 사용되는 케이스는 고려하지 않고, 라벨 없이도 높이를 가지지 않는 방향으로 수정합니다.
장식 요소로서 사용할 경우, Radio를 사용해서는 안됩니다.

@sungik-choi sungik-choi self-assigned this Jan 23, 2024
sungik-choi added a commit that referenced this issue Jan 24, 2024
<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] I tested the changes in various browsers. (or didn't have to)
  - Windows: Chrome, Edge, (Optional) Firefox
  - macOS: Chrome, Edge, Safari, (Optional) Firefox

## Related Issue
<!-- Please link to issue if one exists -->

- #1733 
- Fixes #1734 

## Summary
<!-- Please brief explanation of the changes made -->

Remove LegacyRadio and make Radio available without labels

## Details
<!-- Please elaborate description of the changes -->

- Radio를 라벨 없이도 스타일링할 수 있도록 변경합니다. 라벨이 존재하는 경우에만 36px의 높이를 가지도록 합니다. 라벨이
없는 경우, 접근성에 위배되나 이는 사용처의 책임에 맡깁니다. label id를 직접 연결하거나, VisuallyHidden 등을
사용하여 구현할 수도 있을 것입니다.
- LegacyRadio의 사용처는 데스크에 2곳이 있는데, 위 변경으로 RadioGroup + Radio로 대체할 수 있게되면서
완전히 삭제합니다.

### Breaking change? (Yes/No)
<!-- If Yes, please describe the impact and migration path for users -->

Yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues or PR related to making existing features better
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant