[ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
https://bugs.webkit.org/show_bug.cgi?id=125521

Reviewed by Chris Fleizach.

Source/WebCore:

Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
ATK_ROLE_ALERT instead.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

LayoutTests:

Update expected result in layout test.

* accessibility/aria-mappings-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 42dfe91..84e7f5c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
+
+        [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
+        https://bugs.webkit.org/show_bug.cgi?id=125521
+
+        Reviewed by Chris Fleizach.
+
+        Update expected result in layout test.
+
+        * accessibility/aria-mappings-expected.txt:
+
 2013-12-10  László Langó  <lango@inf.u-szeged.hu>
 
         PageConsole::addMessage should automatically determine column number alongside line number
diff --git a/LayoutTests/accessibility/aria-mappings-expected.txt b/LayoutTests/accessibility/aria-mappings-expected.txt
index 610ea1a..36d6328 100644
--- a/LayoutTests/accessibility/aria-mappings-expected.txt
+++ b/LayoutTests/accessibility/aria-mappings-expected.txt
@@ -21,7 +21,7 @@
 
 
 role="alertdialog" is a dialog which contains an alert message.
-Role for 'alertdialog' div is: AXRole: AXDialog
+Role for 'alertdialog' div is: AXRole: AXAlert
 
 
 role="article" is a  section of a page that consists of a composition that forms an independent part of a document, page, or site
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 4430b97..cd04807 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
+
+        [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
+        https://bugs.webkit.org/show_bug.cgi?id=125521
+
+        Reviewed by Chris Fleizach.
+
+        Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
+        ATK_ROLE_ALERT instead.
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (atkRole):
+
 2013-12-10  Brendan Long  <b.long@cablelabs.com>
 
         [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2
diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
index 2976d360..10d2e0f 100644
--- a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
@@ -534,10 +534,10 @@
 static AtkRole atkRole(AccessibilityRole role)
 {
     switch (role) {
+    case ApplicationAlertDialogRole:
     case ApplicationAlertRole:
         return ATK_ROLE_ALERT;
     case ApplicationDialogRole:
-    case ApplicationAlertDialogRole:
         return ATK_ROLE_DIALOG;
     case ApplicationStatusRole:
         return ATK_ROLE_STATUSBAR;