Comments (6)
I'm not sure as to how PhantomJS handles sessions, but would it be possible to add a list (array) of JS filenames to the pa11y config file which can then be injected into the page before running the HTML_CodeSniffer?
from pa11y.
That's the kind of thing I was thinking yeah, there are a few unknowns though:
- What would happen if the page/URL changes (e.g. if you submit a login form)?
- Do the JS files need to be served through a web-server, or can we inject them into the Phantom browser from the file system?
- Is there a simpler way to solve this problem (e.g. inject a cookie into the page)
from pa11y.
Picking at that last point, wget uses a --cookie-jar
flag to pass along a textual file in the format originally used by Netscape's cookie.txt file. Maybe a flag like that would work? Or, the config file could hold an array of JSON object literals that would represent cookies which could be passed along one by one to phantom.addCookie
? The latter seems doable.
from pa11y.
I like the idea of a JSON object in the config file. It'd be good to keep as much of the config as possible in the JSON
from pa11y.
How does this look for the config file?
{
'cookies': [
{
'name': 'cookie-name',
'value': 'cookie-value',
'domain': 'localhost',
},
{
'name': 'a-different-cookie-name',
'value': 'cookie-value',
'domain': 'localhost',
}
]
}
These cookies could then be injected into the browser before loading the page.
from pa11y.
@whymarrh that looks great!
from pa11y.
Related Issues (20)
- pa11y fails with Github Actions ubuntu-22.04 HOT 2
- pa11y disregards `display: none` inline style, contrary to 4th rule of ARIA Use HOT 2
- Timeouts happening 100% of the time HOT 1
- Pa11y check passes locally, fails in Github Actions HOT 3
- Ignore rules per selector HOT 1
- [Feature] - Playwright support HOT 1
- timeout error for a single url HOT 1
- CircleCI run differs from expected output. JS not running before pa11y test. HOT 1
- Using gitlab ci environment variables to authenticate HOT 1
- Can we get violations defects for after login pages using pa11y? HOT 2
- TimeoutError: Pa11y timed out HOT 6
- Inconsistencies between pa11y and other accessibility tools HOT 1
- Axe runner doesn't include wcag2aaa tag when standard is set to WCAG2AAA. HOT 2
- How do I include multiple Urls in 1 report? HOT 7
- Can I include a config file for a report? HOT 2
- Sort in CosmosDB Mongo APIs mandates indexing
- Error reporting during installation HOT 1
- rules option ignored HOT 1
- Documented require() for reporters doesn't work HOT 3
- Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (869685) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pa11y.