TypeCellOS / TypeCellOS/BlockNote

Bilingual documents: unable to declare language on foreign language passages

Đang mở
#2,823 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

a11y
Ngôn ngữ chính
TypeScript
Star
10.2k
Fork
772
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
17

Mô tả

What’s broken?

When a document contains passages written in two different languages, it is not possible to declare the language on each portion of text. Passages in a foreign language cannot be tagged with the corresponding lang attribute, and passages in French cannot be explicitly assigned lang="fr" either.

What did you expect to happen?

The editor must allow the user to define the language of a selected text passage, so that the lang attribute is applied to the corresponding HTML element with the correct language code (e.g. lang="fr", lang="en", lang="de", etc.). Language changes in a document must be reflected in the generated markup.

Steps to reproduce

Create a document containing passages in French and passages in another language.
Select a passage in a foreign language.
Look for an option to declare the language of this passage.
Observe that no such functionality is available.
Possible solution

Add a "Text language" option in the formatting menu or in a context menu, which applies the lang attribute to the or block element surrounding the selection:

Impact

A blind user navigating with a screen reader reads a bilingual document. The screen reader renders passages in a foreign language with the French speech synthesis voice, producing incorrect and incomprehensible pronunciation. The user cannot access content in a foreign language under normal reading conditions.

BlockNote version

0.51.4

Environment

No response

Additional context

No response

Contribution
  • I'd be interested in contributing a fix for this issue
Sponsor
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Start at the formatting menu or context-menu entry point and trace how a selected text passage becomes an HTML element in the generated markup. Done means users can choose a language such as French, English, or German for the selection, the corresponding lang attribute appears on the surrounding inline or block element, and changes are reflected in generated markup.

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

Đánh giá

Công nghệ
react, typescript
Lĩnh vực
accessibility, frontend, internationalization
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

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.