Skip to content

Add automated accessibility audit + HTML validation to CI pipeline#7751

Merged
mrcasals merged 4 commits intodecidim:developfrom
mainio:test/ci-accessibility-audit
Mar 27, 2021
Merged

Add automated accessibility audit + HTML validation to CI pipeline#7751
mrcasals merged 4 commits intodecidim:developfrom
mainio:test/ci-accessibility-audit

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Mar 25, 2021

🎩 What? Why?

We've had many accessibility issues with Decidim and I would expect new accessibility issues to come up from time to time. There is also quite a long way still to make Decidim 100% accessible.

This is the first step to that direction. This adds automated accessibility audit using axe-core to the CI pipeline and also W3C HTML validation using the w3c_validators gem.

With axe-core, you can find up to 50% of WCAG issues automatically.

This alone will not make Decidim 100% accessible some day but it makes sure new changes won't break any accessibility features that have been already fixed. And if design is changed, it will make it easier to keep the new design accessible.

This adds two new dependencies to the decidim-dev module:

This also adds new shared examples with the name accessible page which can be applied to any page. This will run both validations for the given page:

  1. The accessibility audit validations
  2. HTML validations

This should be gradually applied to all pages that we want to be accessible. The goal of this PR is to introduce the concept to the core, not to implement it everywhere (due to the heavy amount of work needed to make everything accessible). This PR adds it to the following pages:

  • Homepage signed in and signed out
  • Account main page
  • Conversations pages
  • Static pages with and without topics + index
  • Pages component
  • Participatory processes listing page
  • Participatory process steps/phases page
  • Proposals listing page + single proposal page

As these validations are added to these pages, we first need to make sure all tested pages are valid. Therefore, this depends on the following PRs to be merged first:

📌 Related Issues

Testing

Run the specs and see the results.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

- Homepage signed in and signed out
- Account main page
- Conversations pages
- Static pages with and without topics + index
- Pages component
- Participatory processes listing page
- Participatory process steps/phases page
- Proposals listing page + single proposal page
@mrcasals
Copy link
Copy Markdown
Contributor

@ahukkanen all PRs merged, thank you SO MUCH for these PRs! ❤️

@ahukkanen ahukkanen marked this pull request as ready for review March 26, 2021 16:34
@ahukkanen
Copy link
Copy Markdown
Contributor Author

@mrcasals Tests are passing, this is now ready.

@mrcasals mrcasals merged commit 8fadefd into decidim:develop Mar 27, 2021
@ahukkanen ahukkanen deleted the test/ci-accessibility-audit branch March 27, 2021 10:03
entantoencuanto added a commit that referenced this pull request Mar 31, 2021
* develop: (26 commits)
  Fix trustees admin menu (#7772)
  Do not modify the controller class in the controller tests that render views (#7755)
  Add HTML escaping to the expectations as the strings are escaped (#7760)
  Add automated accessibility audit + HTML validation to CI pipeline (#7751)
  fix(elections): js assets manifest (#7759)
  Add admin missing translations (#7702)
  Add Conferences and Admin missing translations (#7653)
  New Crowdin updates (#7735)
  Improve vote flow (#7682)
  Strip the <p> tags from inside the heading elements (#7732)
  Fix the date cell spec failing randomly close to day changes (#7703)
  Change the timeline date color for accessible color contrast against its background (#7750)
  Remove the opacity from process upcoming/past/all filters for accessible contrast (#7749)
  Fix color contrast against the sidebar navigation background (#7748)
  Validate the HTML for the account page (#7747)
  Fix report modal form accessibility (#7746)
  Accessibility fixes for conversations (#7745)
  Add a landmark ARIA role to the cookie banner (#7738)
  Fix HTML validation on standalone content page (#7744)
  Add aria-label to the area filter on participatory space pages (#7743)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants