title: Cant find button using Test Library (React)
body: <p>I'm must be missing something quite obvious, I have a react app that has a left div with multiple buttons, each one of them with different texts. I want to check if every one of those buttons was rendered.So for instance to find one of the buttons (using the Testing Library) I'm doing the following:</p>
  <pre><code>screen.getByText(&quot;/channels/i&quot;, { selector: &quot;button&quot; })
  </code></pre>
  <p>I Also tried</p>
  <pre><code>screen.getByRole(&quot;button&quot;, { name: /channels/i })
  </code></pre>
  <p>But I always get the result</p>
  <pre><code>TestingLibraryElementError: Unable to find an accessible element with the role &quot;button&quot; and name `/channels/i`
  
      There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
  </code></pre>
  <p>But as you can see it does exist</p>
  <p><a href="https://i.stack.imgur.com/EN4aU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EN4aU.png" alt="enter image description here" /></a></p>
  <p>Like that I have probably another 10 buttons, so I don't get why it says that there are no accessible roles.</p>
  <p>What I'm doing wrong?</p>