Skip to content

a11y atspi: Map ButtonMenu role to AT-SPI equivalent

Fushan Wen requested to merge fusionfuture/qtbase:work/fuf/cpbuttonmenu into kde/5.15

at-spi2-core commit [1]

commit ed16f50e4930e32c29f80552eb698baa35b4677e
Author: Fushan Wen <>
Date:   Thu Jul 21 21:49:32 2022 +0800


    This role allows to specify a button will open a menu. It's widely used
    in Hamburger buttons, and Qt has QAccessible:ButtonMenu role for it.

added a new ATSPI_ROLE_PUSH_BUTTON_MENU role to AT-SPI, so map to that from QAccessible::ButtonMenu when building against a recent enough AT-SPI version.

Note that only a follow-up fix [2] for the above-mentioned at-spi2-core commit increased ATSPI_ROLE_COUNT accordingly:

commit b0a062fd02c0cef5cc73b67aae282216856b8d8a
Author: Michael Weghorn <>
Date:   Thu Jul 13 14:15:33 2023 +0200

    Increase ATSPI_ROLE_COUNT after ed16f50e4

        commit ed16f50e4930e32c29f80552eb698baa35b4677e
        Date:   Thu Jul 21 21:49:32 2022 +0800


    added a new role, so increase the role count

[1] [2]

Change-Id: If7082c7478c95c6cc68d1c735de47933599f8d2b Reviewed-by: Jan Arve Sæther (cherry picked from commit beb1a48e)

Build log:


Edited by Fushan Wen

Merge request reports