Bug 222811 - [iOS] Implement additional accessibility support for image overlays
Summary: [iOS] Implement additional accessibility support for image overlays
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-05 10:53 PST by Wenson Hsieh
Modified: 2021-03-05 22:33 PST (History)
6 users (show)

See Also:


Attachments
Patch (24.28 KB, patch)
2021-03-05 12:09 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (22.36 KB, patch)
2021-03-05 12:13 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix non-internal iOS build (22.89 KB, patch)
2021-03-05 13:20 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (22.91 KB, patch)
2021-03-05 13:38 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
For EWS (23.35 KB, patch)
2021-03-05 14:55 PST, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Fix non-internal iOS build (23.65 KB, patch)
2021-03-05 15:44 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix non-internal iOS build (23.48 KB, patch)
2021-03-05 15:46 PST, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (23.38 KB, patch)
2021-03-05 16:18 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-03-05 10:53:17 PST
<rdar://problem/73203775>
Comment 1 Wenson Hsieh 2021-03-05 12:09:40 PST Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2021-03-05 12:13:37 PST
Created attachment 422392 [details]
Patch
Comment 3 Wenson Hsieh 2021-03-05 13:20:22 PST
Created attachment 422402 [details]
Fix non-internal iOS build
Comment 4 Wenson Hsieh 2021-03-05 13:21:07 PST
Thanks for the review!

(Looks like I need a slight adjustment to fix the !ENABLE(IMAGE_EXTRACTION) build)
Comment 5 Devin Rousso 2021-03-05 13:25:56 PST
Comment on attachment 422402 [details]
Fix non-internal iOS build

View in context: https://bugs.webkit.org/attachment.cgi?id=422402&action=review

r=me as well :)

> Source/WebKit/ChangeLog:27
> +        There's no need to make the regular text interaction duck in favor of the image extraction interaction after

"duck"?

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2737
> +        if (HTMLElement::isImageOverlayText(*innerNonSharedNode))

Can/Should we assume that this is not `nullptr`?  Should we have `HTMLElement::isImageOverlayText` take a `const Node*` instead?
Comment 6 Wenson Hsieh 2021-03-05 13:30:27 PST
(In reply to Devin Rousso from comment #5)
> Comment on attachment 422402 [details]
> Fix non-internal iOS build
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=422402&action=review
> 
> r=me as well :)
> 
> > Source/WebKit/ChangeLog:27
> > +        There's no need to make the regular text interaction duck in favor of the image extraction interaction after
> 
> "duck"?

As in, "make one thing duck to avoid another thing", but perhaps that isn't so clear — I'll reword this sentence.

> 
> > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2737
> > +        if (HTMLElement::isImageOverlayText(*innerNonSharedNode))
> 
> Can/Should we assume that this is not `nullptr`?  Should we have
> `HTMLElement::isImageOverlayText` take a `const Node*` instead?

Since this is a hit test result, I'm a bit hesitant to assume that it must be non-null.
Comment 7 Wenson Hsieh 2021-03-05 13:38:15 PST
Created attachment 422407 [details]
Patch
Comment 8 Simon Fraser (smfr) 2021-03-05 13:56:56 PST
Comment on attachment 422407 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=422407&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9412
> +        block(NO);

Use an enum?

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9944
> +    getConfigurationAndContinue(NO);

Use an enum?
Comment 9 Wenson Hsieh 2021-03-05 13:59:54 PST
(In reply to Simon Fraser (smfr) from comment #8)
> Comment on attachment 422407 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=422407&action=review
> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9412
> > +        block(NO);
> 
> Use an enum?

Good call — added this enum, and changed the block to take it instead of BOOL:

enum class ProceedWithImageExtraction : bool {
    No,
    Yes
};

> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9944
> > +    getConfigurationAndContinue(NO);
> 
> Use an enum?
Comment 10 Wenson Hsieh 2021-03-05 14:55:38 PST
Created attachment 422428 [details]
For EWS
Comment 11 Wenson Hsieh 2021-03-05 15:44:34 PST
Created attachment 422444 [details]
Fix non-internal iOS build
Comment 12 Wenson Hsieh 2021-03-05 15:46:20 PST
Created attachment 422445 [details]
Fix non-internal iOS build
Comment 13 Wenson Hsieh 2021-03-05 16:18:39 PST
Created attachment 422450 [details]
Patch
Comment 14 EWS 2021-03-05 22:33:05 PST
Committed r274031: <https://commits.webkit.org/r274031>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422450 [details].