react-magma
react-magma copied to clipboard
Select: Component Label Association Issue
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:
- Navigate to a page containing a Select component with a label
- Open browser Developer Tools and go to the Console tab
- Look for accessibility warnings/errors
- Try using screen reader or form autofill functionality
- 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