# jsx-a11y/control-has-associated-label 🚫 This rule is _disabled_ in the following configs: ☑️ `recommended`, 🔒 `strict`. Enforce that a control (an interactive element) has a text label. There are two supported ways to supply a control with a text label: - Provide text content inside the element. - Use the `aria-label` attribute on the element, with a text value. - Use the `aria-labelledby` attribute on the element, and point the IDREF value to an element with an accessible label. - Alternatively, with an `img` tag, you may use the `alt` attribute to supply a text description of the image. The rule is permissive in the sense that it will assume that expressions will eventually provide a label. So an element like this will pass. ```jsx ``` ## How do I resolve this error? ### Case: I have a simple button that requires a label. Provide text content in the `button` element. ```jsx ``` ### Case: I have an icon button and I don't want visible text. Use the `aria-label` attribute and provide the text label as the value. ```jsx