liip / TheA11yMachine

The A11y Machine is an automated accessibility testing tool which crawls and tests pages of any web application to produce detailed reports.
https://www.liip.ch/
621 stars 66 forks source link

[feature request] Ability to set viewport size #114

Open jasonday opened 6 years ago

jasonday commented 6 years ago

Because content or UI is often hidden/exposed at different viewports with responsive design, allowing for testing at different viewport sizes is important for comprehensive testing.

See axe-crawler for example.

Hywan commented 6 years ago

@jeanmonod @ralf57 It is possible to do that with PhantomJS. You should check pa11y options, it exposes specific options that are passed to PhantomJS to do that.

ralf57 commented 6 years ago

thanks @Hywan @jasonday will look into that ASAP

jasonday commented 6 years ago

Awesome. Additionally, I mentioned axe-crawler because in addition to having a preset config for viewports (see below), but also tests against different browsers.

I think in addition to figuring out the mechanics of the testing, the UI & reporting will need to be figured out as well. I'll try and take some time to wireframe out some potential solutions.

 "viewPorts": [
        {
            "name": "mobile",
            "width": 360,
            "height": 640
        },
        {
            "name": "tablet_vertical",
            "width": 768,
            "height": 1024
        },
        {
            "name": "tablet_horizontal",
            "width": 1024,
            "height": 768
        },
        {
            "name": "desktop",
            "width": 1440,
            "height": 900
        }
    ],