hackforla / internship

The Internship project provides an opportunity for students to work on open source projects in the fields of software, product development, project management, and UI/UX research and design at LA’s fastest growing Civic Tech non-profit organization during their summer.
GNU General Public License v2.0
14 stars 4 forks source link

TWE Design System: add accessibility testing to Microsite #554

Open joshfishman opened 1 month ago

joshfishman commented 1 month ago

Overview

We need to setup testing for the Design System microsite so we can automate accessibility testing and ensure that the design system meets accessibility standards

Action Items

Resources/Instructions

aconstas commented 4 weeks ago

Looking into creating a pre-commit hook with Husky and Pa11y. Commits will be blocked unless they pass the Pa11y accessibility test

aconstas commented 3 weeks ago

4/13/24 Is there a specific accessibility standard that we are trying to comply with? WCAG2A, WCAG2AA, or WCAG2AAA

What type of messages do we want from pa11y? notice? warning? error?

aconstas commented 3 weeks ago

image (1)

Pa11y identified several issues with how mkdocs generates a page from markdown files. One notable error that was logged in my integrated terminal concerns an anchor <a> element in the HTML. The error message from pa11y stated: "Anchor element found with a valid href attribute, but no link content has been supplied."

It's unclear how mkdocs handles these elements internally, but pa11y flagged this as a problem because it can affect website accessibility.

Pa11y cited: WCAG2AA.Principle1.Guideline1_3.1_3_1.F68

Is this an error we are concerned about? Or should I have Pa11y ignore these types of errors?

aconstas commented 3 weeks ago

Exported current Pa11y errors from microsite into Google Sheet (sheets separated by URL):

https://docs.google.com/spreadsheets/d/12YkgTAsDeNIn9DZApfZ478mMONlqnO0QTK3kjdFBmyU/edit?usp=sharing

ExperimentsInHonesty commented 3 weeks ago
ExperimentsInHonesty commented 3 weeks ago

On the spreadsheet, make a tab for all the pages, and add a column to indicate which page, so that we can sort by type of error (in code column). This will help with the evaluation.

aconstas commented 2 weeks ago

Research

I looked for Visual Studio Code accessibility plug-ins and found none that would meet our needs. The plug-ins I did find were linters that would not export error/warning messages (e.g., Axe)

Moving Forward

Questions

Comments

ExperimentsInHonesty commented 2 weeks ago

Next step is to the create the spreadsheet which is all the errors on one sheet.

aconstas commented 2 weeks ago

Created a single Google Sheet with errors from the entire microsite.

Findings

Code Count Message
WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.A.NoContent 1,337 Anchor element found with a valid href attribute, but no link content has been supplied.
WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2 8 This form does not contain a submit button, which creates issues for those who cannot submit the form using the keyboard.
WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.InputCheckbox.Name 6 This checkboxinput element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined, aria-labelledby undefined.
WCAG2AA.Principle1.Guideline1_3.1_3_1.F68 28 This form field should be labelled in some way...
WCAG2AA.Principle1.Guideline1_4.1_4_3.G145.Fail 9 This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 3:1...
WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.InputText.Name 9 This textinput element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined ...
WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.InputRadio.Name 10 This radioinput element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined ...
WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.Textarea.Name 3 This textarea element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined, aria-labelledby undefined.
ExperimentsInHonesty commented 1 day ago

@aconstas Please provide update

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures or links* (if necessary): "Add any pictures or links that will help illustrate what you are working on."
aconstas commented 1 day ago
  1. Progress: Completed the collection of all errors from microsite. We need to discuss what errors we are focused on and what errors we can ignore. Then we need to discus the best way to implement the logging of the errors to Google Sheets.
  2. Blockers: None
  3. Availability: all week
  4. ETA: 5/23 or sooner depending on when we can discuss
  5. Pictures or links:
    Google Sheet