-
Notifications
You must be signed in to change notification settings - Fork 229
Achieving Accessibility Alt text Colour Contrast
In spring 2021, Brandon Walsh performed a general accessibility audit using Google Chrome's Lighthouse feature. Below is some received wisdom from that process, but he might have missed things. In the future, you can find information for how to perform accessibility testing with Lighthouse here - https://developers.google.com/web/tools/lighthouse.
As part of our response to the recommendations outlined within Dr Kavanagh's report and discussed in Issue #2072, we are committing to provide alt text for all figure images, plots and graphs included in lessons.
Alt-text is integrated into the liquid syntax we use to include images. The required format is:
{% include figure.html filename="file-name.png" alt="Visual description of figure image" caption="Caption text to display" %}
Here are some resources to help us write effective alt-text:
- Writing Alt Text for Data Visualization : Amy Cesal
- Web Accessibility Tutorials: Complex images : W3C
- Alt Text & Accessibility : Web Aim
- How to Write Great Image Alt Text : Catherine McNally
- The Right Way to Write Alt Text | : Natalie Gotko
- Examples of Accessible, Effective Chart Descriptions : Frank Elavsky
- Collated list of people and resources in the field Dataviz Accessibility Resources : Frank Elavsky
Note: Most of these articles warn that screen readers cut off alt text which is longer than 125 characters, but elsewhere this is found to be outdated information, although being clear and succinct is recommended.
We use the same translation strategy for sharing translated alt text for images that are shared across the site. The top of the "contribute" page, for example, has an image that is shared across the different language publications. To implement this, we first create a section in _date/snippets.yml for a new set of alt text like this:
write-a-lesson-image-alt:
en: A woman at a desk writing.
es:
fr:
pt:
Then, each page can use the same piece of markup to introduce the image with translated alt text:
<img src="{{site.baseurl}}/images/author-sm.png" class="garnish rounded float-right" alt="{{ site.data.snippets.write-a-lesson-image-alt[page.lang] }}"/>
The important piece here is alt="{{ site.data.snippets.write-a-lesson-image-alt[page.lang] }}" - this fills in the alt text for the image with translated language from the snippets file.
Consider users with colour vision deficiency (colour blindness). Authors and editors are to be aware of avoiding the use of red/green in data visualisations, graphs etc. James Baker explains that most standard languages (including R & Python) have colour vision deficient friendly and accessible libraries. He has collated the following resources, and we ask editors to insist upon on their use:
- R https://cran.r-project.org/web/packages/colorBlindness/index.html
- R https://cran.r-project.org/web/packages/colorBlindness/vignettes/colorBlindness.html
- Python https://pypi.org/project/colorblind/"
Our base theme had a lot of contrast issues. When Brandon performed an accessibility audit in May 2021, he tried to clean things up as best he could. But he might have missed things! Information for how to perform this particular test can be found here - https://web.dev/color-contrast/. In general, the smaller the text on the page the higher the contrast ratio has to be.
- Copyediting
- Copyedit comments
- Typesetting
- Archival Hyperlinks
- Copyright
- DOI
- Gallery image
- Checklist comment
- Handover comment
- Closing comment
- Opening comment Phase 0
- Phase change comment 1 to 2
- Phase change comment 2 to 3
- Phase change comment 3 to 4
- Opening comment Phase 4
- Phase change comment 4 to 5
- Phase change comment 5 to 6
- Phase change comment 6 to 7
- Tracking lesson phase changes
- Organisational Structure
- Trustee Responsibilities
- Trustee and Staff Roles
- Services to Publications
- Funding
Training
- Onboarding-Process-for-New-Editors
- Leading-a-Shadowing-process
- Board-of-Director---Continuing-Development
The Ombudsperson Role
Technical Guidance
- Making Technical Contributions
- Creating Blog Posts
- Service Integrations
- Brand Guidelines
- French Translation Documentation
- Technical Tutorial on Translation Links
- Technical Tutorial on Setting Up a New Language
- Technical Tutorial on Search
- Twitter Bot
- Achieving-Accessibility-Alt-text-Colour-Contrast
- Achieving-Accessibility:-Training-Options
Editorial Guidance
- Achieving Sustainability: Copyediting, Typesetting, Archival Links, Copyright Agreements
- Achieving Sustainability: Lesson Maintenance Workflow
- Achieving Sustainability-Agreed-terminology-PH-em-português
- Training and Support for Editorial Work
- The-Programming-Historian-Digital-Object-Identifier-Policy-(April-2020)
- How to Request a New DOI
- Service-Agreement-Publisher-and-Publications
- ProgHist-services-to-Publications
- Technical Tutorial on Setting Up a New Language
- Editorial Recruitment
Social Guidance
Finances
- Project Costs
- Spending-Requests-and-Reimbursement
- Funding Opportunities
- Invoice Template
- Donations and Fundraising Policies
Human Resources
- Privileges-and-Responsibilities-of-Membership
- Admin-when-team-members-step-down
- Team-Leader-Selection-Process
- Managing-Editor-Handover
- Checklist-for-Sabbaticals
- New Publications Policy
- Parental-Leave-Policy
Project Management
Project Structure
Board of Trustees