Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116204

Need toolkit consensus on the use of the accessible "toggle" action on tree cells

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.10, 6.5.2
    • None
    • Linux/Wayland, Linux/X11

    Description

      TL;DR: Gtk and Qt each expose a "toggle" accessible action on tree items, but that action means/does something different. This makes toolkit-agnostic accessibility support more challenging.

      Steps to reproduce:

      1. Build and run the Simple Tree Model example in Qt Creator
      2. Launch the Accerciser accessibility explorer
      3. Examine the Action associated with each cell using Accerciser's Interface Viewer
      4. Use Accerciser to perform the action

      Expected results:* The "Toggle" action would not be exposed on every cell by default. Or it would at least do something other than selecting the item.

      Actual results: The "Toggle" action is exposed on every cell by default and all it seems to do it select the item - even in the case of expandable items. (Aside: Why no "expand"/"collapse" action?)

      *For historical reasons (Gtk accessibility in Linux), the "toggle" action was/is expected to be exposed on table cells which represented check boxes. This action could be used to change the checked state via accessibility API. BUT more importantly, it was a way for screen readers such as Orca to note that the "checked"/"unchecked" state should be announced for that cell.

      Why this matters: I (Orca maintainer) made a change to Orca to normalize action names (Some toolkits capitalize names; others don't. Some insert punctuation; others don't. Etc.) This change was/is intended to increase the likelihood of Orca identifying actions correctly. Apparently it worked too well because now Orca announces each and every tree cell in Qt apps as an unchecked checkbox. (Qt capitalizes "Toggle"; Gtk does not.)

      I will, of course, address this in Orca. But from some quick testing it appears that the way to address it will be to just ignore the "Toggle" action in Qt, at least for trees. And that seems unfortunate. UPDATE: I just landed that change in Orca.

      That brings me back to my summary and TL;DR: it would be great if Gtk and Qt agreed upon what these actions should be named and what a named action should do. Adding these actions to Atspi would also be positive move, so I just filed https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/141. Input there is welcome.

      In the meantime, is there an actual need (e.g. in Windows, perhaps) to expose the "Toggle" action on tree items by default? If no one is consuming this action on any platform, maybe it could be removed??

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            joanmarie Joanmarie Diggs
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes