Skip to content

Part 2 4.2 폼과 폼 조작 focus와 blur 챕터 번역 누락 작업 (#1548) #1588

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions 2-ui/4-forms-controls/2-focus-blur/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@

여기서 주의해야 할 점은 `onblur`는 요소가 포커스를 잃고 난 *후*에 발생하기 때문에 `onblur` 안에서 `event.preventDefault()`를 호출해 포커스를 잃게 하는걸 '막을 수 없다'라는 사실입니다.

```warn header="JavaScript-initiated focus loss"
A focus loss can occur for many reasons.
```warn header="자바스크립트로 인한 포커스 해제"
포커스 해제가 일어나는 이유는 다양합니다.

One of them is when the visitor clicks somewhere else. But also JavaScript itself may cause it, for instance:
그중 하나는 사용자가 다른 곳을 클릭했을 때입니다. 하지만 자바스크립트 자체가 포커스 해제를 일으킬 수도 있습니다. 몇 가지 예시를 들어보겠습니다.

- An `alert` moves focus to itself, so it causes the focus loss at the element (`blur` event), and when the `alert` is dismissed, the focus comes back (`focus` event).
- If an element is removed from DOM, then it also causes the focus loss. If it is reinserted later, then the focus doesn't return.
- `alert`는 포커스를 자신에게 이동시키기 때문에 요소가 포커스를 잃게 되고(`blur` 이벤트), `alert` 창이 취소되었을 때 포커스를 다시 기존 요소로 돌려놓습니다(`focus` 이벤트).
- 해당 요소가 DOM에서 삭제되었을 때도 포커스 해제가 일어납니다. 나중에 요소를 DOM에 다시 삽입해도 포커스는 돌아오지 않습니다.

These features sometimes cause `focus/blur` handlers to misbehave -- to trigger when they are not needed.
이러한 특징으로 인해 가끔 `focus`와 `blur` 핸들러가 필요 없을 때 트리거 할 수 있습니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아래 번역을 제안드립니다.

이러한 특징들은 `focus`와 `blur` 핸들러가 작동하면 안 되는 상황에서 잘못 작동하도록 오류를 만들어 내기도 합니다.

근거
focusblur가 "필요 없다"라는 표현은 "발생하면 안 되는" 상황을 표현한 것 같습니다.
따라서 오류에 해당한다는 것을 부각하여 재번역 하였습니다.


The best recipe is to be careful when using these events. If we want to track user-initiated focus-loss, then we should avoid causing it ourselves.
최선의 방안은 이런 이벤트를 사용할 때 주의하는 것입니다. 사용자의 포커스 해제를 추적하고 싶다면 웹 페이지 자체가 포커스 해제를 일으키지 않아야 합니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아래 번역을 제안드립니다.

최선의 방안은 이런 이벤트를 사용할 때 주의하는 것입니다. 사용자에 의한 포커스 해제를 추적하고 싶다면 자바스크립트로 인한 의도 되지 않은 포커스 해제가 발생하지 않도록 해야 합니다.

근거
기존 "사용자의 포커스 해제"와 "사용자에 의한 포커스 해제"는 같은 의미이지만
후자의 표현을 썼을 때 더욱 그 의미가 분명한 것 같습니다.

웹 페이지"를 "자바스크립트"로 바꾼 이유는 해당 문단의 제목에 "자바스크립트"를 사용했기 때문에 흐름상 "자바스크립트"가 더 자연스러울 것 같아서 수정하였습니다.

원문에서 작성된 "it"은 L101에서 제가 작성한 자바스크립트에 의한 "오작동"을 의미하는 것으로 해석됩니다.
따라서 단순히 "포커스 해제"로만 표현하는 것보다 잘못된 상황이라는 점을 부각하는 것이 더 좋을 것 같습니다.

```
## tabindex를 사용해서 모든 요소 포커스 하기

Expand Down