# label-has-for 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 `for` as in `for=[ID of control]` To fully cover 100% of assistive devices, you're encouraged to validate for both nesting and id. ## 🔧 Options This rule takes one optional object argument of type object: ```json { "rules": { "vuejs-accessibility/label-has-for": [ "error", { "components": ["VLabel"], "controlComponents": ["VInput"], "required": { "every": ["nesting", "id"] }, "allowChildren": false } ] } } ``` For the `components` option, these strings determine which elements (**always including** `