Use of Narrator and other screen readers
-
Greetings, I have the "joy" of trying to make my ActiveX controls act as Accessibility servers, so that they provide information about the value, role, and desrciption (how to be used) to potential screen readers. The "joy" comes from the lack of information on accessibility, and the bit that there is out there is not clear. I am hoping that somebody on this list has some experience with this area and can help me out with the following. I have a custom slider in the form of an ActiveX Control. Everytime the value of the slider changes, I want the new value to be read by the screen reader. At the moment I am call the following code everytime the slider value has changed. CComPtr pAccPropSrv; HRESULT hr; hr = pAccPropSrv.CoCreateInstance(CLSID_AccPropServices); if(hr == S_OK) { COleVariant varValue(m_sPositionText); COleVariant varRole((long)ROLE_SYSTEM_SLIDER, VT_I4); COleVariant varDescr("Some description"); pAccPropSrv->SetHwndProp(m_hWnd, OBJID_CLIENT, 0, PROPID_ACC_VALUE, varValue); pAccPropSrv->SetHwndProp(m_hWnd, OBJID_CLIENT, 0, PROPID_ACC_ROLE, varRole); pAccPropSrv->SetHwndProp(m_hWnd, OBJID_CLIENT, 0, PROPID_ACC_DESCRIPTION, varDescr); } This actually results in the screen reader reading the Role and Value, and not the Description. More importantly it only reads it the first time that the slider gets focus. No matter how many times I click on the slider and move it arround after that, the screen reader does not read the new value. If I then click on another control, and then back on the slider again, then it reads the value once more. I thought this was a problem with my ActiveX slider control but it is also how default controls such as radio buttons of Windows, work, they will onyl read out their value once until they regain focus again. However, the standard windows slider control, has the exception that it will read out the value everytime the slider changes due to the user pressing the arrow keys. In my ActiveX control slider, the same code as above is called whenever the slider position changes, regardless of whether it changed my the mouse or keys. I guess in summary, what I need help with is: 1) Why does the screen reader not read out my ActiveX control's description. 2) Why does the value of my ActiveX control only get read once until it regains focus. 3) How does the standard windows slider manage to read its new value when the value has changed due to the user pressing the arrow