WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
229815
AX: findModalNodes() and currentModalNode() should include modal <dialog>
https://bugs.webkit.org/show_bug.cgi?id=229815
Summary
AX: findModalNodes() and currentModalNode() should include modal <dialog>
Tim Nguyen (:ntim)
Reported
2021-09-02 10:10:33 PDT
https://webkit-search.igalia.com/webkit/rev/367ea6f7763d697109fda42511484000a23de506/Source/WebCore/accessibility/AXObjectCache.cpp#253
Attachments
Patch
(3.31 KB, patch)
2021-09-02 12:04 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Patch
(12.71 KB, patch)
2021-09-03 09:30 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Patch
(13.45 KB, patch)
2021-09-03 14:02 PDT
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-02 10:11:08 PDT
<
rdar://problem/82680992
>
Tim Nguyen (:ntim)
Comment 2
2021-09-02 12:04:21 PDT
Created
attachment 437179
[details]
Patch
chris fleizach
Comment 3
2021-09-02 12:33:19 PDT
Comment on
attachment 437179
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437179&action=review
> Source/WebCore/ChangeLog:8 > + * accessibility/AXObjectCache.cpp:
can you add a new test for this case?
chris fleizach
Comment 4
2021-09-02 12:34:43 PDT
Comment on
attachment 437179
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437179&action=review
> Source/WebCore/accessibility/AXObjectCache.cpp:259 > + bool isAriaModal = !equalLettersIgnoringASCIICase(element->attributeWithoutSynchronization(aria_modalAttr), "true");
this should change to !equalLetter -> equalLetter
> Source/WebCore/accessibility/AXObjectCache.cpp:261 > + if ((hasDialogRole && isAriaModal) || (is<HTMLDialogElement>(element) && downcast<HTMLDialogElement>(element)->isModal()))
is there any provision for aria-model=false on <dialog modal> to override the native status?
Andres Gonzalez
Comment 5
2021-09-02 12:54:31 PDT
(In reply to Tim Nguyen (:ntim) from
comment #2
)
> Created
attachment 437179
[details]
> Patch
--- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ a/Source/WebCore/accessibility/AXObjectCache.cpp + bool isAriaModal = !equalLettersIgnoringASCIICase(element->attributeWithoutSynchronization(aria_modalAttr), "true"); Should be : + bool isAriaModal = equalLettersIgnoringASCIICase(element->attributeWithoutSynchronization(aria_modalAttr), "true"); Could you add a helper function, bool isModalElement, that does: + bool hasDialogRole = nodeHasRole(element, "dialog") || nodeHasRole(element, "alertdialog"); + bool isAriaModal = equalLettersIgnoringASCIICase(element->attributeWithoutSynchronization(aria_modalAttr), "true"); + return (hasDialogRole && isAriaModal) || (is<HTMLDialogElement>(element) && downcast<HTMLDialogElement>(element)->isModal()); or equivalent?
Tim Nguyen (:ntim)
Comment 6
2021-09-02 13:03:07 PDT
(In reply to chris fleizach from
comment #4
)
> Comment on
attachment 437179
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=437179&action=review
> > > Source/WebCore/accessibility/AXObjectCache.cpp:259 > > + bool isAriaModal = !equalLettersIgnoringASCIICase(element->attributeWithoutSynchronization(aria_modalAttr), "true"); > > this should change to > > !equalLetter -> equalLetter
Good catch, thanks!
> > Source/WebCore/accessibility/AXObjectCache.cpp:261 > > + if ((hasDialogRole && isAriaModal) || (is<HTMLDialogElement>(element) && downcast<HTMLDialogElement>(element)->isModal())) > > is there any provision for aria-model=false on <dialog modal> to override > the native status?
dialog.showModal() will make the content behind inert and make only the dialog interactive per the HTML spec. From:
https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html
> Applying the aria-modal property to the dialog element replaces the technique of using aria-hidden on the background for informing assistive technologies that content outside a dialog is inert.
So no, aria-modal=false should not have an effect on this, since the content behind will be inert either way, according to the HTML spec.
Tim Nguyen (:ntim)
Comment 7
2021-09-03 09:30:10 PDT
Created
attachment 437278
[details]
Patch
James Craig
Comment 8
2021-09-03 09:45:38 PDT
> is there any provision for aria-model=false on <dialog modal> to override > the native status?
In general, equivalent host language attributes "win", but ARIA roles always "win." There's a little ambiguity in this case, since the `is modal` flag of the dialog API is not an attribute, but in general, I would not expect `aria-modal` to have any effect on the dialog element. There's more detail about conflict resolution in the ARIA spec, and I'll file an ARIA issue about the ambiguity.
https://w3c.github.io/aria/#host_general_conflict
James Craig
Comment 9
2021-09-03 10:04:05 PDT
Filed ARIA 1610
https://github.com/w3c/aria/issues/1610
Andres Gonzalez
Comment 10
2021-09-03 10:52:37 PDT
(In reply to Tim Nguyen (:ntim) from
comment #7
)
> Created
attachment 437278
[details]
> Patch
--- a/LayoutTests/accessibility/dialog-showModal.html +++ a/LayoutTests/accessibility/dialog-showModal.html + window.okButton = accessibilityController.accessibleElementById("ok"); + shouldBeFalse("okButton.isIgnored"); This should be false when the dialog is modal or not because it is part of the dialog. Why are we checking this only if it is not modal? Perhaps it makes more sense to check whether an element int the background is not ignored, which you are already doing in backgroundAccessible. Is it really a good idea that we convey that there is a modal dialog if it is aria-hidden or opacity 0?
Tim Nguyen (:ntim)
Comment 11
2021-09-03 11:41:34 PDT
(In reply to Andres Gonzalez from
comment #10
)
> (In reply to Tim Nguyen (:ntim) from
comment #7
) > > Created
attachment 437278
[details]
> > Patch > > --- a/LayoutTests/accessibility/dialog-showModal.html > +++ a/LayoutTests/accessibility/dialog-showModal.html > > + window.okButton = > accessibilityController.accessibleElementById("ok"); > + shouldBeFalse("okButton.isIgnored"); > > This should be false when the dialog is modal or not because it is part of > the dialog. Why are we checking this only if it is not modal? Perhaps it > makes more sense to check whether an element int the background is not > ignored, which you are already doing in backgroundAccessible. > > Is it really a good idea that we convey that there is a modal dialog if it > is aria-hidden or opacity 0?
Yes, because the content behind is rendered inert per-HTML spec, and there's also a backdrop behind blocking any interaction.
Tim Nguyen (:ntim)
Comment 12
2021-09-03 14:02:37 PDT
Created
attachment 437309
[details]
Patch
Tim Nguyen (:ntim)
Comment 13
2021-09-03 14:08:00 PDT
Committed
r282022
(
241327@main
): <
https://commits.webkit.org/241327@main
>
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