You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Boris Goldowsky <bg...@cast.org> on 2016/03/17 22:47:40 UTC

simple automated accessibility testing

I¹m thinking it would be handy to automate testing of the simplest of
validity & accessibility requirements ­ eg, checking that every <img>
element has an alt attribute, and every form input has a label.
Eventually maybe taking this up a notch and connecting with existing HTML
validation and a11y-checking engines.   As things stand, I have to do any
such testing manually with browser-based tools.

Is this something that already exists, or that others would be interested
in collaborating on?

I can think of a couple of possible methods that would be pretty general ­
not sure which is best.

A) extend WicketTester, adding some assertion methods; then one could
write a Junit test for each page asserting that it passes certain criteria.

B) create a runtime checker, something like StatelessChecker, that when
enabled would check every page as it is rendered.  You could turn this on
during development to have checking of the actual rendered HTML.

I¹d be grateful for any thoughts or suggestions.

Boris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: simple automated accessibility testing

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Thu, Mar 17, 2016 at 10:47 PM, Boris Goldowsky <bg...@cast.org>
wrote:

> I¹m thinking it would be handy to automate testing of the simplest of
> validity & accessibility requirements ­ eg, checking that every <img>
> element has an alt attribute, and every form input has a label.
> Eventually maybe taking this up a notch and connecting with existing HTML
> validation and a11y-checking engines.   As things stand, I have to do any
> such testing manually with browser-based tools.
>
> Is this something that already exists, or that others would be interested
> in collaborating on?
>
> I can think of a couple of possible methods that would be pretty general ­
> not sure which is best.
>
> A) extend WicketTester, adding some assertion methods; then one could
> write a Junit test for each page asserting that it passes certain criteria.
>
> B) create a runtime checker, something like StatelessChecker, that when
> enabled would check every page as it is rendered.  You could turn this on
> during development to have checking of the actual rendered HTML.
>
> I¹d be grateful for any thoughts or suggestions.
>

I think approach A) is better. No need to extend WicketTester though. You
can just introduce a helper class that uses
tester.getLastResponseAsString() and do the checks.

If you go with Approach B) then better use IResponseFilter.
See org.apache.wicket.response.filter.EmptySrcAttributeCheckFilter for
inspiration.


>
> Boris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>