Skip to content
← Back to rules

jsx-a11y/no-aria-hidden-on-focusable 정확성

An auto-fix is available for this rule.

작동 방식

포커스 가능한 요소에 aria-hidden="true"가 설정되지 않도록 강제합니다.

왜 문제인가요?

포커스 가능한 요소에 aria-hidden="true"를 설정하면 스크린 리더 사용자에게 혼란이나 예기치 않은 동작이 발생할 수 있습니다.

예시

이 규칙에 대한 잘못된 코드 예시:

jsx
<div aria-hidden="true" tabIndex="0" />

이 규칙에 대한 올바른 코드 예시:

jsx
<div aria-hidden="true" />

사용 방법

설정 파일 또는 명령줄 인터페이스에서 이 규칙을 활성화하려면 다음을 사용할 수 있습니다:

json
{
  "plugins": ["jsx-a11y"],
  "rules": {
    "jsx-a11y/no-aria-hidden-on-focusable": "error"
  }
}
bash
oxlint --deny jsx-a11y/no-aria-hidden-on-focusable --jsx-a11y-plugin

참고 자료