AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
https://bugs.webkit.org/show_bug.cgi?id=138566

Reviewed by Chris Fleizach.

Source/WebCore:

Added support for aria-modal attribute on dialog/alertdialog roles.
When modal dialog is displayed, all other contents will be unaccessible.

Tests: accessibility/aria-modal-multiple-dialogs.html
       accessibility/aria-modal.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::~AXObjectCache):
(WebCore::AXObjectCache::findAriaModalNodes):
(WebCore::AXObjectCache::updateCurrentAriaModalNode):
(WebCore::AXObjectCache::isNodeVisible):
(WebCore::AXObjectCache::ariaModalNode):
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::labelChanged):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::handleActiveDescendantChanged):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
(WebCore::AXObjectCache::handleScrollbarUpdate):
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaCurrentState):
(WebCore::AccessibilityObject::isAriaModalDescendant):
(WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
(WebCore::AccessibilityObject::hasTagName):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
* html/HTMLAttributeNames.in:

LayoutTests:

* accessibility/aria-modal-expected.txt: Added.
* accessibility/aria-modal-multiple-dialogs-expected.txt: Added.
* accessibility/aria-modal-multiple-dialogs.html: Added.
* accessibility/aria-modal.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@191931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
11 files changed