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

Đang mở Phù hợp với người mới
#1,929 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
css, html, javascript

Hướng nghiên cứu

Mở wicket-user-guide/src/main/asciidoc/js/guide.js và đọc followSections(): nó tách mỗi liên kết TOC thành một span.toc-num cộng với một nút văn bản và loại bỏ khoảng trắng giữa chúng. Giữ khoảng trắng trong nút văn bản (ví dụ: thêm ' ' + match[2]), sau đó xóa margin-right trên .toc-num trong wicket.css để khoảng hở trực quan không bị nhân đôi. Build guide và xác nhận TOC trông không thay đổi và tên truy cập của một liên kết đọc là "3. Why should I learn Wicket?". Phối hợp với #1904, vốn sửa cùng những dòng đó và nên được đưa vào trước.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
800
Fork
423
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
170

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/wicket

Tất cả issue của apache/wicket

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.