-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support gatherer options, exclude css selectors in axe #10247
Comments
Thanks for filing! This isn't currently possible out of the box. You'd need to manually create a custom config and a copy of the accessibility gatherer to run axe with custom arguments yourself. #2087 is one step into making this more a reality with the ability to pass gatherer options, but we're a ways off from that at the moment. |
@patrickhulce Would this be specific to the Accessibility gatherer ? I have more knowledge of that and might be able to work on adding support for passing in the axe config to the gatherer. It could be part of the lighthouse/configuration as a separate
But I could also see this being extended to other Gatherers - which would be nice to have I guess. But I have no knowledge of other Gatherers and won't be able to contribute towards that. Maybe that can be a separate effort (by someone else) after adding config override ability to the Accessibility Gatherer? |
Thanks for the offer @mohanraj-r! We would want to make gatherer options be available to all gatherers but don't need to necessarily update any other gatherer to take advantage of them yet. We've implemented the early steps to make this happen before but they never landed. Essentially we want to be able to define options alongside a gatherer, like can be done with audit options today. It would look something like the below module.exports = {
extends: 'lighthouse:default',
passes: [
{
passName: 'defaultPass',
gatherers: [{id: 'custom-axe', path: 'Accessibility', options: {/* ... */}}],
}
],
audits: [
{id: 'custom-axe-audit', path: 'path/to/custom/audit.js'}
]
} |
Hi, I double check this morning, I found this options property in the Gatherer configuration. But I do not know how to get this options inside my Gatherer Implementation. @patrickhulce how do you retrieve this options inside your custom-axe gatherer ? |
How can we exclude certain elements from the lighthouse cli run. In axe we can do the following where certain elements are excluded based on css selectors:
The text was updated successfully, but these errors were encountered: