Bug 231478 - AX: AccessibilityMenuListPopup shouldn't add ignored children
Summary: AX: AccessibilityMenuListPopup shouldn't add ignored children
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-09 09:03 PDT by Tyler Wilcock
Modified: 2021-10-12 07:09 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.26 KB, patch)
2021-10-09 09:09 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2021-10-09 09:03:16 PDT
An invariant of our accessibility tree is that it doesn't include things that are ignored. Most paths end up at AccessibilityObject::insertChild, which prevents ignored children from being inserted. However, AccessibilityMenuListPopup::addChildren directly calls m_children.append, so it should ensure the things it adds aren't ignored first.
Comment 1 Radar WebKit Bug Importer 2021-10-09 09:03:30 PDT
<rdar://problem/84062657>
Comment 2 Tyler Wilcock 2021-10-09 09:09:02 PDT
Created attachment 440711 [details]
Patch
Comment 3 chris fleizach 2021-10-09 09:24:00 PDT
Comment on attachment 440711 [details]
Patch

Is it possible to add an example of an ignored menu list item in a layout test?
Comment 4 Tyler Wilcock 2021-10-09 11:51:44 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 440711 [details]
> Patch
> 
> Is it possible to add an example of an ignored menu list item in a layout
> test?

We can't test this because AccessibilityMenuListPopup is ignored on Mac and iOS, so its addChildren method never gets called, and thus we can't exercise the changed code. This patch would make this class do the right thing should it become un-ignored.
Comment 5 chris fleizach 2021-10-09 13:14:16 PDT
Which platforms will this have an effect on?
Comment 6 Andres Gonzalez 2021-10-12 07:09:07 PDT
(In reply to Tyler Wilcock from comment #4)
> (In reply to chris fleizach from comment #3)
> > Comment on attachment 440711 [details]
> > Patch
> > 
> > Is it possible to add an example of an ignored menu list item in a layout
> > test?
> 
> We can't test this because AccessibilityMenuListPopup is ignored on Mac and
> iOS, so its addChildren method never gets called, and thus we can't exercise
> the changed code. This patch would make this class do the right thing should
> it become un-ignored.

How can AccessibilityMenuListPopup become un-ignored?