Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAction and accessibility: how to read text when activated?
Qt 6.11 is out! See what's new in the release blog

QAction and accessibility: how to read text when activated?

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 857 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmam
    wrote on last edited by
    #1

    I'm working on a Qt5 Widgets application which has a QAction which can be activated either through the app's menu or through a keyboard shortcut. I want the screen reader to announce the action is being performed when QAction is activated. Does anyone know if Qt supports this usecase? If it does, how do we get assistive technologies to pick up on a QAction being activated?

    SGaistS 1 Reply Last reply
    0
    • R rmam

      I'm working on a Qt5 Widgets application which has a QAction which can be activated either through the app's menu or through a keyboard shortcut. I want the screen reader to announce the action is being performed when QAction is activated. Does anyone know if Qt supports this usecase? If it does, how do we get assistive technologies to pick up on a QAction being activated?

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean take advantage of Qt accessibility support ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Do you mean take advantage of Qt accessibility support ?

        R Offline
        R Offline
        rmam
        wrote on last edited by
        #3

        @SGaist that might be it. My goal is to allow assistive technologies (i.e., screen readers like NVDA) to inform the user that an action was executed, or more specifically that a QAction was triggered.

        Does Qt support anything like this?

        JonBJ 1 Reply Last reply
        0
        • R rmam

          @SGaist that might be it. My goal is to allow assistive technologies (i.e., screen readers like NVDA) to inform the user that an action was executed, or more specifically that a QAction was triggered.

          Does Qt support anything like this?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @rmam
          @SGaist gave a link to https://doc.qt.io/qt-5/accessible.html. I have not used it, but does QAccessibleActionInterface Class allow what you want, perhaps on const QString &QAccessibleActionInterface::pressAction()?

          TBH I don't know how to use it/no more than this, so you may have to wait for someone else to give you guidance on how to use it.

          SGaistS 1 Reply Last reply
          0
          • JonBJ JonB

            @rmam
            @SGaist gave a link to https://doc.qt.io/qt-5/accessible.html. I have not used it, but does QAccessibleActionInterface Class allow what you want, perhaps on const QString &QAccessibleActionInterface::pressAction()?

            TBH I don't know how to use it/no more than this, so you may have to wait for someone else to give you guidance on how to use it.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            I have run some tests using orca not so long on Linux and the application was already accessible so it should already be good.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            R 1 Reply Last reply
            0
            • SGaistS SGaist

              I have run some tests using orca not so long on Linux and the application was already accessible so it should already be good.

              R Offline
              R Offline
              rmam
              wrote on last edited by
              #6

              @SGaist the app I work on targets windows with the global menu bar populated with plain old QAction instances, and NVDA doesn't pick up on any action being triggered.

              Do you mind checking if you have any additional config to get screen readers to react to QAction instances being triggered?

              SGaistS 1 Reply Last reply
              0
              • J Offline
                J Offline
                jozdr
                wrote on last edited by
                #7

                I had some experience with JAWS, basically it reads the text (and eventually tooltip) of the element with focus.

                IMHO the simplest method is to put the focus on a label that describes your current element after the action was triggered.

                i.e: click on menu Print Preview -> print preview window opens -> onShowEvent: set focus on title "Print Preview"

                1 Reply Last reply
                0
                • R rmam

                  @SGaist the app I work on targets windows with the global menu bar populated with plain old QAction instances, and NVDA doesn't pick up on any action being triggered.

                  Do you mind checking if you have any additional config to get screen readers to react to QAction instances being triggered?

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @rmam sorry I can't, I currently don't have any Windows machine at hand.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved