# [Deprecated] label-has-for *This rule was deprecated in v6.1.0. It will no longer be maintained.* Enforce label tags have associated control. There are two supported ways to associate a label with a control: - nesting: by wrapping a control in a label tag - id: by using the prop `htmlFor` as in `htmlFor=[ID of control]` To fully cover 100% of assistive devices, you're encouraged to validate for both nesting and id. ## Rule details This rule takes one optional object argument of type object: ```json { "rules": { "jsx-a11y/label-has-for": [ 2, { "components": [ "Label" ], "required": { "every": [ "nesting", "id" ] }, "allowChildren": false }] } } ``` For the `components` option, these strings determine which JSX elements (**always including** `