RSpec 2 View test to validate accessible markup?
-
13-01-2021 - |
Question
I want to make some basic accessibility tests in RSpec (obviously, to be further validated by other tools and users later; this is to catch the low-hanging fruit like finding images w/o alt tags and such)
Most of the examples have just checking content is present is similar; what I want to do is get a list of tags, and then make assertions that "all" the tags found meet certain criteria (e.g. all images have to have either an alt or a longdesc; each form input needs either a label or title, etc).
Can RSpec do this, or if not, is there a tool that can?
Thanks.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow