본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)75k · #2816

direction-attribute

하는 일

이 스킬은 웹 페이지가 언어에 맞는 텍스트 방향을 설정했는지 확인합니다. 오른쪽에서 왼쪽으로 쓰는 언어 사이트나 방향이 섞인 콘텐츠를 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓사이트에 아랍어, 히브리어, 페르시아어, 우르두어 콘텐츠를 추가할 때.
  • ✓사용자 이름이나 댓글에 왼쪽에서 오른쪽, 오른쪽에서 왼쪽 텍스트가 섞일 때.
  • ✓메뉴와 레이아웃이 오른쪽에서 왼쪽으로 읽는 사용자에게 거꾸로 보일 때.

스킬 링크

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/direction-attribute/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/direction-attribute/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 사이트가 아랍어 독자에게 올바르게 표시되는지 확인해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 페이지와 사용자 댓글 같은 방향이 섞인 부분의 dir 속성을 확인하고, 필요한 곳에 올바른 값이나 격리 태그를 추가하도록 제안합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Set text direction for RTL languages

Without proper dir attributes, RTL text displays incorrectly, UI elements appear backwards, and screen readers announce content in the wrong order.

Quick Reference

  • Set dir="rtl" on <html> for Arabic, Hebrew, Persian, Urdu
  • Use dir="auto" for user-generated content
  • Combine with CSS logical properties (inline-start, inline-end)
  • Test UI mirroring for navigation, icons, and layouts
  • Use bidi isolation such as <bdi> for inline mixed-direction user content

Check

Verify that this HTML document uses the appropriate dir attribute to indicate text direction for right-to-left languages like Arabic, Hebrew, or mixed content. Check user-generated inline text for dir="auto" or bidi isolation where names, handles, or snippets mix writing directions.

Fix

Add the dir attribute to the html element or specific elements with values 'ltr' (left-to-right), 'rtl' (right-to-left), or 'auto' for automatic detection. Use <bdi> or equivalent bidi isolation for mixed-direction inline content.

Explain

Explain how the dir attribute helps browsers and screen readers properly display and navigate text in different writing directions.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Set text direction for RTL languages. Flag exact elements, attributes, and routes where the rendered HTML violates the rule. Inspect user-generated inline content, not only page-level locale wrappers.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/direction-attribute

자주 묻는 질문

dir 속성은 무엇을 하나요?

텍스트가 왼쪽에서 오른쪽으로 흐를지 오른쪽에서 왼쪽으로 흐를지 브라우저에 알려 줍니다.

bidi 격리는 무엇인가요?

방향이 섞인 텍스트가 주변 텍스트를 흐트러뜨리지 않게 합니다. 스킬은 이를 위해 bdi 태그를 제안합니다.

레이아웃 미러링도 다루나요?

내비게이션, 아이콘, 레이아웃이 올바르게 뒤집히는지 테스트하라고 스킬은 제안합니다.

상세 정보

작성자의 원본 설명

Use when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

인기도

GitHub 스타
75k
순위
#2816
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬