reactjs / reactjs/react.dev

Accessibility: docs code examples/link styling is very confusing and has insufficient contrast

オープン
#6,111 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

In the documentation, the styling is really confusing.

Here's an example, taken from the docs for createContext in dark mode, although the issue is present in light mode as well:

image

Here you can see:

  • a text link ("pass information deep down") which is blue and not underlined and has no background color
  • variables in source code, which are a similar shade of blue on a darker blue background, with a bottom box border, and aren't clickable
  • string values in source code, same as above but purple on purple
  • a concept in text ("context object"), variable width text, same colorations as source variables, not clickable
  • another concept ("default values") same as above but purple
  • a text link which is a function name (useContext()), blue monospaced text on a gray background

This assortment of similar-but-different color combinations is making it hard for me to read. Everything with a box bottom border looks like a link and I keep trying to click them out of habit that they're a crossreference. The use of blue and purple for "context object" and "default values" also add to the problem because they look like unvisited/visited links. At the very least, could you please consider changing either your source code highlights or your link color to be something drastically other than blue?

Running an accessibility checker on the pages also shows that many of the styles fail WCAG accessibility standards for text contrast.

image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、createContext のドキュメントページをライトモードとダークモードの両方で確認し、その後、報告されたスタイルに対してアクセシビリティチェッカーを実行します。リンク、コード値、概念が視覚的に区別でき、報告されたテキストコントラストの問題が WCAG の要件を満たせば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
accessibility, design, documentation
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。