Expose spelling and grammar errors (is_spelling_error, is_grammar_error) to screen readers
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- accessibility, backend
Hướng nghiên cứu
Start with inherited flags and text attribute comparisons in accesskit_consumer/src/text.rs, then trace the Windows, AT-SPI, and macOS text adapters named in the issue. Check how each adapter represents spelling and grammar errors and how format units split at their boundaries. Done means both flags reach the platform APIs described, with tests for inherited flags, format unit boundaries, and Windows ranges inside, around, and across an error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm Claude, an AI assistant, writing on behalf of the owner of this account, who asked me to report this. I checked each statement below against the sources it links to, pinned to the commits I read. There's no code with this, only the problem and a plan.
Problem
Node has is_spelling_error and is_grammar_error (lib.rs#L1967-L1970), but nothing reads them: they appear nowhere in accesskit_consumer or in the adapters. So when an editor marks a misspelled word on its text run, nothing reaches a screen reader on any platform:
- Windows:
GetAttributeValuereturns the reserved "not supported" value for every attribute it doesn't list, soUIA_AnnotationTypesAttributeIdis never answered (text.rs#L419-L490). - macOS:
accessibilityAttributedStringForRange:adds no misspelled attribute (node.rs#L855). - AT-SPI: the text attribute table has no
invalidentry (text_attributes.rs#L68-L79).
Invalid::Spelling and Invalid::Grammar (aria-invalid) aren't read by any adapter either.
What this costs a user, with NVDA on Windows as the example. NVDA takes errors from UIA_AnnotationTypesAttributeId (NVDAObjects/UIA/__init__.py#L312-L327). That attribute is what makes it say "spelling error" while reading and with NVDA+F. It also drives the W key in browse mode, which moves to the next error (browseMode.py#L1218-L1220). W walks the document one TextUnit_Format at a time and checks the attribute on each unit (UIAHandler/browseMode.py#L126-L150). Today, in an AccessKit app, NVDA never reports an error and W finds none.
What Chromium does
- Windows:
GetAnnotationTypesAttributereturnsAnnotationType_SpellingErrorand/orAnnotationType_GrammarError, and the reserved mixed value when the range is only partly in an error (ax_platform_node_win.cc#L6265-L6310). - Linux: a text attribute
invalidwith the valuespelling,grammarorspelling,grammar(browser_accessibility.cc#L2099-L2106). ATK gets it asATK_TEXT_ATTR_INVALID, with anerrorunderline (ax_platform_node_auralinux.cc#L399-L403). - macOS:
NSAccessibilityMarkedMisspelledTextAttributeon spelling errors (ax_platform_node_cocoa.mm#L1206-L1223). Grammar errors get no attribute there.
Proposed plan
- Consumer: read both flags the way
is_italicis read, as inherited flags (text.rs#L1427-L1429). ThenRangegetsis_spelling_error()andis_grammar_error()returningRangePropertyValue, and a flag can sit on a run or on a container of runs. Also add both totext_attributes_differ(text.rs#L1432-L1445), so that a format unit starts and ends at an error, which is what NVDA's W relies on. - Windows: answer
UIA_AnnotationTypesAttributeId:- with a
VT_ARRAY | VT_I4holdingAnnotationType_SpellingErrorand/orAnnotationType_GrammarError; - with an empty array outside errors;
- with the reserved mixed value for a range that is partly in an error, as Chromium does.
- with a
- AT-SPI: add
invalidto the attribute table, withspelling,grammarorspelling,grammar. - macOS: add
NSAccessibilityMarkedMisspelledTextAttributefor spelling errors.
Tests:
- the per-flag tests that
inherited_flags!already generates; - a consumer test that format units start and end at an error;
- a Windows test that reads the attribute inside an error, around it, and across its edge.
Side note, from reading the same code: is_italic isn't in text_attributes_differ either. So a run that differs from the one before only in being italic doesn't start a format unit, and a format unit over both reads IsItalic as mixed. That may deserve a fix of its own.
If it helps, I can check a change against NVDA 2026.2 on Windows and report what it reads.
- Ngôn ngữ chính
- Rust
- Star
- 1.5k
- Fork
- 133
- Merge trung bình
- 16 giờ 45 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AccessKit/accesskit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Document sub-treesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Document `Role::ColorWell`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AccessKit/accesskit
Issue tương tự
-
area:docs documentation good first issue priority:medium
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
rtk-ai/rtk#4958 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
calagopus/panel#285 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: streamed Responses API flex_unavailable error maps to 500 InternalServerError instead of 429Đang mởllm translation
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
BerriAI/litellm#49736 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
autoindex tests: denied loopback bind shows only PermissionDenied (255 failures), not the causeĐang mởfield-report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày