Table of contents entries in the reference guide have no space between number and title for screen readers

オープン 初心者向け
#1,929 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
css, html, javascript

調査の方向性

wicket-user-guide/src/main/asciidoc/js/guide.js を開いて followSections() を読んでください。これは各 TOC リンクを span.toc-num とテキストノードに分割し、その間の空白を削除します。テキストノード内のスペースを維持し(例: ' ' + match[2] を追加)、次に wicket.css の .toc-num の margin-right を削除して、視覚的な隙間が二重にならないようにします。ガイドをビルドし、TOC が変わっていないこと、およびリンクのアクセシブル名が "3. Why should I learn Wicket?" と読まれることを確認してください。#1904 と調整してください。これは同じ行を編集しており、先にマージされるべきです。

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

説明

The entries in the reference guide's table of contents have no space between the section number and the title in their text. Screen readers announce them as, for example, "3.Why should I learn Wicket?" and "13.4.Pageable repeaters".

The cause is followSections() in wicket-user-guide/src/main/asciidoc/js/guide.js. It splits each TOC link into a span.toc-num holding the number and a text node holding the title, and drops the whitespace in between. The visual gap comes from margin-right on .toc-num in wicket.css, so on screen it looks fine, but the link's text content and accessible name have no space. This was introduced in #1845.

The same text ends up in other names built from the link. In #1904 the disclosure buttons are labelled "Sections for 3.Why should I learn Wicket?".

Fix: keep the space in the text when the link is split up. One way is to append ' ' + match[2] instead of match[2] and drop the margin-right from .toc-num. Then check that the TOC still looks the same and that the accessible names read "3. Why should I learn Wicket?".

This touches the same lines in guide.js as #1904, so it should wait until #1904 is merged.

主要言語
Java
スター
800
フォーク
423
平均マージ
1日 1時間
マージ済み PR(30日)
170

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

apache/wicket のほかの issue

apache/wicket の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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