Skip to content

kas-text update; use child Role::TextRun for input fields#528

Merged
dhardy merged 3 commits intomasterfrom
push-onxtmtynvxuu
Jul 26, 2025
Merged

kas-text update; use child Role::TextRun for input fields#528
dhardy merged 3 commits intomasterfrom
push-onxtmtynvxuu

Conversation

@dhardy
Copy link
Copy Markdown
Collaborator

@dhardy dhardy commented Jul 25, 2025

This updates kas-text corresponding to kas-gui/kas-text#98.

Adds Role::AccesskitVerbatim and uses it to report the text in an EditField as specified here, save that character and word data is not provided (requires more extensive kas-text changes I don't wish to work on since in my opinion AccessKit should query existing text objects for this kind of detail instead of using its own algorithms over character-level reconstructions).

This is a hack and hopefully will be replaced eventually.

In my testing, the screen reader can now read SpinBox values but not EditBox values; I don't know why but the only difference visible to AccessKit should be what the parent node is (Role::SpinButton in the former case, Role::ScrollView in the latter case). CC @DataTriny SpinBox already has a numerical value set.

@DataTriny
Copy link
Copy Markdown

At least for now and on Windows, all text inputs appear as empty to screen readers even if they are not, and moving the caret report nothing. Perhaps more interestingly at this stage, I've noticed a delay when tabbing into a text input.

@dhardy dhardy force-pushed the push-onxtmtynvxuu branch from 52b523a to 0aa4402 Compare July 25, 2025 16:44
@dhardy
Copy link
Copy Markdown
Collaborator Author

dhardy commented Jul 25, 2025

I don't understand what's going on there. There shouldn't be a delay; if anything AccessKit info is updated far too often in the current code. All text inputs should get their contents set via a TextRun child too.

@dhardy dhardy force-pushed the push-onxtmtynvxuu branch 2 times, most recently from 51ea5bd to b99964a Compare July 26, 2025 08:59
@dhardy dhardy merged commit b28d747 into master Jul 26, 2025
5 checks passed
@dhardy
Copy link
Copy Markdown
Collaborator Author

dhardy commented Jul 26, 2025

I removed Role::AccesskitVerbatim from this PR since it failed to make EditField input accessible and is not my preferred approach. The commits are here: https://github.com/kas-gui/kas/compare/b28d7477..accesskit-verbatim

@dhardy dhardy deleted the push-onxtmtynvxuu branch December 30, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants