3 ms·
You're right about the advantage of using standard Win32 controls. But you omitted an important part of that sentence you quoted from the website: "Based on the
by mwcampbell 9y ago
You're right about the advantage of using standard Win32 controls. But you omitted an important part of that sentence you quoted from the website: "Based on the powerful editing component Scintilla". Scintilla is indeed a custom control, and it doesn't implement either of the Windows accessibility APIs (UI Automation or Microsoft Active Accessibility, let alone MSAA's unofficial extension IAccessible2). So why does it work with a screen reader?
First of all, Scintilla doesn't work with all screen readers. I know for sure that it doesn't work with Narrator. So why does it work with NVDA, the OP's choice of screen reader?
The answer is basically an accident of Windows's history. Going back to the very beginning, the main way that an application queried or manipulated a Windows control was by sending it window messages. Because early versions of Windows had cooperative multitasking and no security, any application could send messages to any other application's windows. Presumably for backward compatibility, or perhaps because nobody thought to do it differently in the 90s, this openness was carried forward into Win32, including Windows NT. Some limitations have been added for security, particularly in Vista, but basically, if any two apps are running under the same user account, they can send window messages to each other.
It turns out that this capability is very useful for screen readers and other assistive technologies. Even after Microsoft introduced the Active Accessibility API sometime between Windows 95 and Windows 98, that API had some gaps, particularly when it came to working with editable text controls and multi-column list views. Screen readers worked around these deficiencies by using the window messages provided by these standard controls.
So, Scintilla exposes its own window messages, and NVDA uses those to make it accessible. I do wonder why Scintilla took this route, especially since it's multi-platform. It could have simply exposed a C API. In that case, it would be much less accessible (completely inaccessible if it uses something newer than GDI to render its text), unless it implemented UI Automation or IAccessible2. So, really, screen reader users just got lucky in this case.