I'm having a hard time understanding why my assertion isn't working.
Here's the DOM:
<h4>
<span aria-hidden="true">foo</span>
<span>bar</span>
</h4>
And here's my assertion:
screen.getByRole('heading', { name: /foo/i, hidden: true })
I've read the documentation on the hidden flag, but i'm still having trouble understanding why this isn't working.
Any ideas?