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. Accessibility for QAction contained in QMenu

Accessibility for QAction contained in QMenu

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 2.8k Views 1 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.
  • A Offline
    A Offline
    AndreiTuicu
    wrote on last edited by
    #1

    Hello everyone!

    Can anyone help me with the following problem?
    I'm trying to make the screen-reader tell also the shortcut assigned to a QAction object contained in a QMenu, not only it's name. For example: insted of "Open" i want the screen reader to say "Open Ctrl+O". As far as I can tell the screen-reader only sees QAction::text(), but I cannot add there the string for the shortcut.

    I have to mention: I'm using Qt 5.2.1 and the screen reader is NVDA.
    Thank you!
    Andrei Tuicu

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Maybe a silly question but did you use setText ?

      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
      • A Offline
        A Offline
        AndreiTuicu
        wrote on last edited by
        #3

        Hello and thank you for your reply! :)

        Unfortunatelly, if things were that simple I wouldn't need to ask the question here. :( It's true that I can use the setText method, but then I would duplicate the text for shortcut, like this:
        http://i63.photobucket.com/albums/h145/andreituicu/ex1_zps4cc5dbc1.jpg

        The string for the shortcut from the right side of the menu is from adding it using the setShortcut method and this is the string that I would like the screen-reader to tell. The string from the left is from using the setText method and concatenating the name of the option with it's shortcut.

        I was asking if there is another property that I can set or a workaround in order to get the results that I want. For example I can do this easily for QMenu. I can use the setAccessibilityName method to add the text "File" and use the setAccessbilityDesc to add the text "Alt+F" and the screen-reader will tell me "File menu Alt+F".

        I found the property setWhatsThis, which will display a string I think in the statusBar, although I'm not sure if it is the statusBar or it just overlaps, but the screen reader dosen't see this string either.

        Thank you!
        Andrei

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I see what you mean and I'm wondering if it could be considered as a bug or missing feature for QAction.

          You should check the "bug report system":http://bugreports.qt-project.org to see if it's something already mentioned.

          Asking on the interest mailing list about it could also be a good idea. You'll found there Qt's developers/maintainers (this forum is more user oriented)

          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
          • A Offline
            A Offline
            AndreiTuicu
            wrote on last edited by
            #5

            I was beginning to wonder the same thing, since I'm working at this already for a week and I've tried setting every property of QAction in every combination that made sense. I thought that maybe it was something that I didn't know, because I'm quite new to Qt. I've seen this feature at VLC, but they might be using a custom plugin for accessibility.

            Thank you for your advice, I will post a bug report on the issue tracker and see what will developers tell me. :)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Please, also post the link to the report here so other can find it :)

              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
              • A Offline
                A Offline
                AndreiTuicu
                wrote on last edited by
                #7

                Sure, here it is. :)
                https://bugreports.qt-project.org/browse/QTBUG-38915

                I also got the same answer on another forum, here is a link (I hope it's ok to post this here, if not please let me know and I will remove it):
                http://www.qtcentre.org/threads/59079-Accessibility-for-QAction-contained-in-QMenu

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Thanks for sharing !

                  No, nothing wrong with that, gathering information from other good places isn't a crime ;)

                  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