without htmlFor when select', () => {
+ render(
+
+
+ ,
+ );
+
+ const labelElement = screen.getByText('Release');
+ expect(labelElement.tagName).to.equal('DIV');
+ expect(labelElement).not.to.have.attribute('for');
+
+ const combobox = screen.getByRole('combobox');
+ expect(combobox).to.have.attribute('aria-labelledby');
+ expect(combobox.getAttribute('aria-labelledby')).to.include(labelElement.id);
+ });
+
+ it('renders the label as a
when native is set via slotProps', () => {
+ render(
+
+
+ ,
+ );
+
+ const labelElement = screen.getByText('Release');
+ expect(labelElement.tagName).to.equal('DIV');
+ expect(labelElement).not.to.have.attribute('for');
+
+ const combobox = screen.getByRole('combobox');
+ expect(combobox.getAttribute('aria-labelledby')).to.include(labelElement.id);
+ });
+
+ it('renders the label as a