WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
257867
Support custom annotations for Accessibility in composition contexts.
https://bugs.webkit.org/show_bug.cgi?id=257867
Summary
Support custom annotations for Accessibility in composition contexts.
Jack Wiig
Reported
2023-06-08 14:48:31 PDT
This change broadens the information that we can parse from an attributed string in a composition context. Now, annotations (attributes that have no meaningful value, usually @YES or "1") can be conveyed. We use this in accessibility to convey when an inline prediction is happening, so assistive technologies know not to process that text as part of the user's typing.
Attachments
Patch
(37.78 KB, patch)
2023-06-08 15:01 PDT
,
Jack Wiig
no flags
Details
Formatted Diff
Diff
Patch
(38.87 KB, patch)
2023-06-08 16:23 PDT
,
Jack Wiig
no flags
Details
Formatted Diff
Diff
Patch
(38.31 KB, patch)
2023-06-09 11:28 PDT
,
Jack Wiig
no flags
Details
Formatted Diff
Diff
Patch
(38.47 KB, patch)
2023-06-09 11:42 PDT
,
Jack Wiig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(38.53 KB, patch)
2023-06-09 11:52 PDT
,
Jack Wiig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-06-08 14:48:42 PDT
<
rdar://problem/110488738
>
Jack Wiig
Comment 2
2023-06-08 15:01:08 PDT
Created
attachment 466642
[details]
Patch
Jack Wiig
Comment 3
2023-06-08 16:23:37 PDT
Created
attachment 466644
[details]
Patch
Jack Wiig
Comment 4
2023-06-09 11:28:09 PDT
Created
attachment 466652
[details]
Patch
Jack Wiig
Comment 5
2023-06-09 11:42:33 PDT
Created
attachment 466653
[details]
Patch
Jack Wiig
Comment 6
2023-06-09 11:52:59 PDT
Created
attachment 466654
[details]
Patch
Tyler Wilcock
Comment 7
2023-06-09 13:52:29 PDT
Comment on
attachment 466654
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=466654&action=review
> Source/WebKit/UIProcess/mac/WebViewImpl.mm:5111 > + auto it = annotations.find(key); > + if (it == annotations.end()) > + it = annotations.add(key, Vector<CharacterRange> { }).iterator;
I think HashMap::ensure does this (find a value, initializing it if necessary). Might express the intent a bit better (if it works here).
> Source/WebKit/UIProcess/mac/WebViewImpl.mm:5150 > underlines = compositionUnderlines(string); > + annotations = compositionAnnotations(string);
The indentation is different between these two lines. Not sure which is right, though.
> Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:669 > + auto it = annotations.find(name); > + if (it == annotations.end()) > + it = annotations.add(name, Vector<WebCore::CharacterRange> { }).iterator;
Another place where HashMap::ensure might work?
Jack Wiig
Comment 8
2023-06-09 14:00:26 PDT
I didn't know the function of HashMap::ensure, but now that I do, I'll switch to using that. Thanks! As for the indentation difference, the first line is the single-line else clause if HAVE(REDESIGNED_TEXT_CURSOR) is true, otherwise, it's just part of the same scope as the annotations line I added. I think the thought was it's safer to leave it indented to convey that it's part of an else block, but that was not code I wrote.
Tyler Wilcock
Comment 9
2023-06-09 14:02:10 PDT
> As for the indentation difference, the first line is the single-line else > clause if HAVE(REDESIGNED_TEXT_CURSOR) is true, otherwise, it's just part of > the same scope as the annotations line I added. I think the thought was it's > safer to leave it indented to convey that it's part of an else block, but > that was not code I wrote.
Got it, sounds good, thanks!
EWS
Comment 10
2023-06-09 23:54:07 PDT
Committed
265055@main
(ef93c1b412c0): <
https://commits.webkit.org/265055@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 466654
[details]
.
EWS
Comment 11
2024-05-28 17:08:09 PDT
Test gardening commit
279418@main
(190ac0f18d5d): <
https://commits.webkit.org/279418@main
> Reviewed commits have been landed. Closing PR #29202 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug