Add aria-expanded attribute for accessibility#47
Merged
luukdv merged 3 commits intocyntler:masterfrom Oct 9, 2021
Merged
Conversation
ab277cf to
4933df9
Compare
Collaborator
|
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. |
Contributor
Author
|
Hello! Sure, I've updated the tests labels, let me know if you want me to change anything else 😀 |
Collaborator
|
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 :) |
Contributor
Author
|
Oh sorry, I missed that part, that's done now 😅 |
This was referenced Sep 13, 2024
This was referenced Sep 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello !
As mentionned in #46, this PR adds the aria-expanded attribute :)