[nvda] Gecko X(HTML) role strings

Gecko exposes more detailed semantic information about web content to
MSAA than Internet Explorer:

> BSTR roles are used for important roles that have not been defined by
> Microsoft. When the role is retrieved in a VARIANT returned from
> get_accRole, check to see if variant.vt == VT_BSTR. If it is, than
> variant.bstrVal contains the role string.
> 
> The role string may be an HTML tag name followed by comma, space and
> the namespace of the current element. In most current cases the
> namespace can be ignored, but it may become important in the future.

http://www.mozilla.org/access/windows/at-apis#knowndif

For example, Gecko uses this to expose the Q and H1 to H6 elements to
MSAA. Which obviously rocks. But currently NVDA just reads these as
something like "editable text read only", which is less than
informative.

I've been trying to add support for these role strings to the
getRoleName method in MSAAHandler.py, without much success. I assumed
that accRole would return a VARIANT and that therefore
isinstance(role,VARIANT) would test true, but that appears not be the
case. I've wrestled with this for a couple of futile hours. Can anyone
more experienced in Python, Windows programming, or both, see how this
should work?

--
Benjamin Hawkes-Lewis

To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To unsubscribe from the list send a blank message to:
nvda-request@xxxxxxxxxxxxx
 with 'unsubscribe' in the Subject field.
Thank you for your continued support of Nonvisual Desktop Access, an open 
source free screen reader for Microsoft Windows:
http://www.kulgan.net/nvda/

Other related posts: