Why is RTL showing hidden elements as visible?
expect(screen.queryByText(/months in operation\?/i)).not.toBeVisible()
Received element is visible: <label aria-hidden="true" for="monthsDropdown" />
expect(screen.queryByText(/months in operation \?/i)).not.toBeInTheDocument()
expected document not to contain element, found <label aria-hidden="true" for="monthsDropdown">Months in operation?</label> instead
The parent div for this label also has the styles of display: none; visibility: hidden; height: 0;
Is this expected behavior?