Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - MSAA support?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MSAA support?

 Post Reply Post Reply
Author
Message
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 74
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Topic: MSAA support?
    Posted: 21 December 2007 at 12:21am
Using 11.2.2:
 
One of my visually impaired users is having a problem with one of my new apps:
 
--------------------
"I see that you aren't using #32768 standard Windows menus anymore.  Our product expects to see a menustart event before the focus to the first menu item when you press the alt key and a menuend event when the menu is removed.  Are you familiar with MSAA (if not I'm sure you can find out info on MSDN)?  Is this menuing system something you created or is it a toolkit you are using?  If the later do you have the ability to get them to fire the events?"
--------------------
 
Does the commandbar menu not support MSAA?  If not, I'll either need to switch back to a conventional menu (I have a lot of visually impaired users) or modify the commandbar source.  (Can you give me a quick pointer on where in the code to start?)
 
Thanks for your help.
 
Rex Conn
JP Software
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2007 at 1:00am
Hello,
 
Yes, CommandBars support MSAA and its events.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 74
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2007 at 2:11pm
Apparently your MSAA support isn't working quite the way that screen readers expect.
 
Here's what I got from one  of my beta testers, who is a developer at GW Micro (gwmicro.com -- they produce screen reader software).
 
--------------------
Here is msaa.zip with the accevent testing tool.  I included an event capture of Notepad verses TC.  Notice that Notepad issues SYS_MENUSTART and SYS_MENUEND events and TC doesn't.  These are important to us.  Also I believe the focus in TC should come after the SYS_MENUPOPUPSTART like it does in Notepad.
--------------------
 
In addition to my app, I also tried this with a couple of your sample apps and they do not make the "SYS_MENUSTART" and "SYS_MENUEND" calls.  (They do make the "SYS_MENUPOPUPSTART" and "SYS_MENUPOPUPEND" calls.)
 
Where in the CommandBars menu code are you making the MSAA calls?  (I tried searching the source code but couldn't find anything.)
 
I can send you the accevent tool if you need it for testing.
 
Thanks for your help.
 
Rex Conn
JP Software
Back to Top
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 74
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Posted: 27 December 2007 at 10:13am
Hi Oleg:
 
If it would help, one of the developers at GW-Micro has offered to talk to your developers directly about what needs to be done to get CommandBars to work correctly with screen readers.
 
Let me know if you need the contact information.
 
Rex Conn
JP Software
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2007 at 5:39am
Hi,
yes, SYS_MENUSTART" and "SYS_MENUEND" didn't supported. Downloading GW Micro to test.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 74
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2007 at 2:35pm
Hi Oleg:
 
If you have questions about implementation details with the MSAA screen readers, you can contact Michael Lawler at GWMicro (he's also one of my beta testers):
 
 
I've made a (hopefully temporary) change in my code to allow users to optionally select a standard Windows menu if they're having problems with their screen reader.  Let me know when you have a fix.
 
Thanks again!
 
Rex Conn
JP Software
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 January 2008 at 3:43am
Hello,
 
I installed this tool.... Actually it works for me quite well. What exactly doesn't work for you? it reads menu items, toolbar items etc.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
salfon View Drop Down
Newbie
Newbie
Avatar

Joined: 03 June 2009
Location: United Kingdom
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote salfon Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2009 at 11:42am
I'm handling accessibility support right now in our product. I see this same issue with CommandBars. We're using v.13.0.0. The menu gets focus - and CXTPCommandBar WILL call NotifyWinEvent for focus change onto menu - but no SYS_MENUSTART or SYS_MENUEND. So a screen reader doesn't know to 'announce' that the user is now in a menu.
(to reproduce, in app with CommandBars, I hit ALT. now i'm in the main menu, but i don't realize it - screen reader doesn't say so. hit alt again - no feedback that i'm out of the menu. the name of the menu item is read sometimes, like a UI item that got focus, but it's not really helpful)

Is there any plans to fix this? right now i'm trying to send the notify myself, by overriding the SetTrackingMode in a menu class derived
from CXTPMenuBar, like so:

   //override to ensure proper SYS_MENUSTART and END are sent
    virtual BOOL SetTrackingMode(int bMode, BOOL bSelectFirst = TRUE, BOOL bKeyboard = FALSE)
    {
        TRACE("Tracking in beeclustermenu\n");
        BOOL res = TRUE;
        bool sendEnd = false;
               
        //if it's being selected, but was not previously,
        //the base sends the focus, but no menustart. so send that         
        if ((bMode && !m_bTracking))
        {
            AccessibleNotifyWinEvent(EVENT_SYSTEM_MENUSTART , m_hWnd, OBJID_MENU, 0);
            m_started = true;
        }
        else if ((m_bTracking && !bMode)
                  && m_started)
        {
            //if it's losing selection, send menuend AFTER base call.
            sendEnd = true;                  
            m_started = false;
        }    

        res =__super::SetTrackingMode(bMode, bSelectFirst , bKeyboard );
        if (sendEnd)
        {
             AccessibleNotifyWinEvent(EVENT_SYSTEM_MENUEND , m_hWnd, OBJID_MENU, 0);
        }

        return res;
    };

the messages are sent fine, according to the AccEvent32.exe from Microsoft, and the screenreader i'm testing (mostly JAWS, but also GW Micro WindowsEyes on occasion) are able to give the menu information like expected.

Another problem I've noticed is if i have the dropdown menu open and focused, and click right-arrow in keyboard to navigate to the next menu, so that its menu is also dropped down and focused, the screen reader sometimes misses this - only reading name of menu-bar item. After
looking at events sent, I think it's a problem of the EVENT_OBJECT_FOCUS sent for the menu-bar being sent after the EVENT_OBJECT_FOCUS and MENUPOPUPSTART for the submenu. I tried out a change in BOOL CXTPCommandBar::SetSelected(int nSelected, BOOL bKeyboard)
to send the FOCUS event before continuing selection, like so (swapped order of these 2 lines):

  if (IsTrackingMode()) AccessibleNotifyWinEvent(EVENT_OBJECT_FOCUS , m_hWnd, OBJID_MENU, m_nSelected + 1);
       
  pSelected->OnSetSelected(bKeyboard ? max(TRUE_KEYBOARD_NEXT, bKeyboard) : TRUE);       
 

  Testing with this shows EVENT_OBJECT_FOCUS for parent menu bar item is sent before the submenu, and the screen readers are now able to identify that the popup is open and has focus, properly.  But i haven't tested other possible side-effects of this change.
 
  I'm not sure these are the best ways to correct the events being sent, so any feedback from you guys would be great.
 
  Thank you,
  Sabrina Alfonso
  Xtreme Toolkit Pro 13.0.0
  Windows XP
  MFC/Visual C++ 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.