babel / babel/website

Improve accessibility and color contrast

Open
#1,570 6 comments 2 reactions 0 assignees View on GitHub
help wanted new site
Dominant language
TypeScript
Stars
777
Forks
1.4k
Avg merge
16h 45m
Merged PRs (30d)
3

Description

I was previewing the new website on my phone and I noticed that the color contrast is quite low on the search form at the top. So I checked the whole front page with [Pa11y](https://github.com/pa11y/pa11y) and found out that there are quite a few errors in terms of accessibility.

The majority of them are quite easy to fix so it shouldn't take long to do that.

![Screenshot](https://user-images.githubusercontent.com/5839772/36120430-0def1f68-103b-11e8-9ede-2aed44e6a8a4.jpg)

## A few errors

```
Error: The html element should have a lang or xml:lang attribute which describes the language of the document.
├── WCAG2AA.Principle3.Guideline3_1.3_1_1.H57.2
├── html
└──

• Error: Img element is the only content of the link, but is missing alt text. The alt text should describe the purpose of the link.
├── WCAG2AA.Principle1.Guideline1_1.1_1_1.H30.2
├── html > body > div:nth-child(1) > div > header > a
└──

• Error: This form field should be labelled in some way. Use the label element (either with a "for" attribute or wrapped around the form field), or "title", "aria-label" or "aria-labelledby" attributes as appropriate.
├── WCAG2AA.Principle1.Guideline1_3.1_3_1.F68
├── #hero-repl-in > textarea
└──

• Error: This textarea element does not have a name available to an accessibility API. Valid names are: label element, title attribute, aria-label attribute, aria-labelledby attribute.
├── WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.Textarea.Name
├── #hero-repl-out > textarea
└──

• Error: This form field should be labelled in some way. Use the label element (either with a "for" attribute or wrapped around the form field), or "title", "aria-label" or "aria-labelledby" attributes as appropriate.
├── WCAG2AA.Principle1.Guideline1_3.1_3_1.F68
├── #hero-repl-out > textarea
└──

• Error: Img element is the only content of the link, but is missing alt text. The alt text should describe the purpose of the link.
├── WCAG2AA.Principle1.Guideline1_1.1_1_1.H30.2
├── html > body > div:nth-child(2) > div > div:nth-child(1) > div > div > div > div:nth-child(3) > div > div > div > div > a:nth-child(1)
└──

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running Pa11y against the front page and compare its output with the listed selectors, including #search_input_react, #hero-repl-in, and #hero-repl-out. Review the affected page elements for the reported language, image-alt, form-label, textarea-name, and color-contrast errors; done means the reported accessibility errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, typescript
Domain
accessibility, frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.