react-magma icon indicating copy to clipboard operation
react-magma copied to clipboard

Select: Component Label Association Issue

Open moathabuhamad-cengage opened this issue 4 months ago • 0 comments

Describe the bug

The Select component's label element uses a for attribute that references a <div> element instead of a proper form input element. This causes accessibility issues and prevents browser autofill functionality from working correctly. The browser console shows "Incorrect use of

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to a page containing a Select component with a label
  2. Open browser Developer Tools and go to the Console tab
  3. Look for accessibility warnings/errors
  4. Try using screen reader or form autofill functionality
  5. Observe that the label doesn't properly associate with the select input

Expected behavior

The label should properly associate with a focusable form element (like an <input> or <select>) to enable:

  • Proper screen reader functionality
  • Clicking the label should focus the select component
  • Browser autofill should work correctly
  • Full accessibility compliance

Screenshots

Image

moathabuhamad-cengage avatar Aug 14 '25 15:08 moathabuhamad-cengage