sveltestrap
sveltestrap copied to clipboard
fix(test): badge component
CHANGELOG:
- prevent use querySelector to get elements (bad practice, because our classes could change in future versions)
- Check tag, class and content in each test
I add the role="status"
which is the right role for a badge, because is informing about the status of the app/user. I think that thi library could give a extra value if paying a little of attention to accesibility so I add it this here: https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA22.html
Questions
- Boostrap 5 deprecate the anchor tag as badge, because a badge should have a role status and each link has a link role. We should continue supporting this?
- I noticed a extra case that maybe we could integrate in our badge, it's in bootstrap docs, what do you think?
Docs link: https://getbootstrap.com/docs/5.0/components/badge/