Closed jgrenat closed 2 years ago
Thanks!
The tests are a bit repetitive, can you change them to the following?
it(`has an expansion indicator (for accessibility) when toggled`, () => {
render(<Hamburger toggled />)
expect(screen.getByTestId('tilt')).toHaveAttribute('aria-expanded', 'true')
})
it(`doesn't have an expansion indicator (for accessibility) when closed`, () => {
render(<Hamburger />)
expect(screen.getByTestId('tilt')).toHaveAttribute('aria-expanded', 'false')
})
I'll define these attributes one level up and spread them into the individual components when I have time, so the repetition would be solved there as well.
Hello! Sure, I've updated the tests labels, let me know if you want me to change anything else 😀
They're still a bit repetitive, can you change them (also the test contents) to the snippet above? So they'd be just 2 tests. Thanks in advance :)
Oh sorry, I missed that part, that's done now 😅
Hello !
As mentionned in #46, this PR adds the aria-expanded attribute :)