a11y: Add role exception for GtkScrolledWindow

ARIA does not have a "scroll pane" role, but AT-SPI does.
This commit is contained in:
Emmanuele Bassi 2020-11-12 14:37:21 +00:00
parent 0d6e4f7a6e
commit 429c7fc039

View File

@ -21,8 +21,10 @@
#include "config.h"
#include "gtkatspiutilsprivate.h"
#include "gtkenums.h"
#include "gtkpasswordentry.h"
#include "gtkscrolledwindow.h"
/*< private >
* gtk_accessible_role_to_atspi_role:
@ -298,6 +300,10 @@ gtk_atspi_role_for_context (GtkATContext *context)
if (GTK_IS_PASSWORD_ENTRY (accessible))
return ATSPI_ROLE_PASSWORD_TEXT;
/* ARIA does not have a "scroll area" role */
if (GTK_IS_SCROLLED_WINDOW (accessible))
return ATSPI_ROLE_SCROLL_PANE;
return gtk_accessible_role_to_atspi_role (role);
}