Skip to content
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

Feature request: Allowlist known a11y violations #25

Open
bbuchalter opened this issue Nov 1, 2023 · 0 comments
Open

Feature request: Allowlist known a11y violations #25

bbuchalter opened this issue Nov 1, 2023 · 0 comments

Comments

@bbuchalter
Copy link

bbuchalter commented Nov 1, 2023

This feature request is inspired by this post, whose primary point can be summarized as follows:

When deprecating in a large code-base the only way to reliably avoid new deprecated behaviour is a failing test that tells you what to do. Otherwise the pace that new deprecated code is introduced can easily outpace the speed at which you can remove them, or be a massive source of frustration.

The goal of this feature would be to not force developers to fix all known a11y issues every time they change a file.

Proposed implementation

Currently axe-linter.sh is where errors are counted and exit 1 is returned to fail the build. Although the jq cookbook has a recipe to filter objects based on the contents of a key, it feels like we're stretching the limits of what is appropriate to do in bash and jq. Using a proper programming language seems like a reasonable step.

According to the GitHub actions documentation on the definition of the ubuntu-latest container, this will result in Ubuntu 22.04 being used. This release ships with a variety of languages including Ruby 3.0 and Python 3.10.0 both of which would be excellent tools for filtering the error response from the API to exclude items on an allowlist.

The choice of Ruby seems like it could have the added benefit of honoring the spirit of issue #24. That issue suggests switching axe-linter.sh to use axe linter connector to "keep consistency and redundancy". I think we could accomplish the same goal by using the axe-core-api Ruby gem.

So in short, I propose that:

  1. We rewrite the responsibilities of axe-linter.sh in Ruby, using the axe-core-api gem first, and then
  2. Add additional behaviors to support allow lists of known violations.

I suspect this would also lay the foundation for other feature requests and better testability of this action.

If you'd be interested in this, I'd be happy to draft a PR for further consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant