Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make custom GUI controls visible to screen readers?

I'm trying to improve the accessibility of my Delphi made application to vision impaired users. My application uses many custom GUI components. They mostly descend from TWinControl or TGraphicControl.

My custom components seem to be invisible when testing with NVDA. For example NVDA will respond by reading the name of the control (or other details) when mousing over regular Delphi VCL controls such as buttons or forms. By contrast NVDA doesn't respond at all when mousing over any of my custom controls.

How do I make my custom components visible to NVDA and other screen reading software?

like image 983
Shannon Matthews Avatar asked Jul 08 '13 05:07

Shannon Matthews


People also ask

Does visibility hidden affect screen readers?

display:none or visibility: hiddenThe content is removed from the visual flow of the page and is ignored by screen readers. Do not use this CSS if you want the content to be read by a screen reader.

How would you visually hide an element in the UI so it's still accessible for screen readers?

The conventional way is to use CSS ( display:none; and visibility:hidden; ) or the HTML 5 `hidden` attribute. These properties hide elements not only on the screen, but also for screen reader users. Thus, these elements will not be visible nor vocalized by Assistive technologies (AT).

What can screen readers not read?

Like astrological, musical, political and religious symbols. Yes, Unicode characters might look interesting and stand out visually. But they are inaccessible to screen reader users. Screen readers may skip them entirely or read something irrelevant to the user.

Can screen readers read CSS?

The good news is that all screen readers read the CSS generated content in Chrome, Safari, and Microsoft Edge.


1 Answers

Found the answer on the NVDA Design Overview page. NVDA uses a number of accessibility APIs to gather information about GUI controls. NVDA supports:

  • Microsoft Active Accessibility (MSAA) (also known as IAccessible),
  • ​IAccessible2,
  • Java Access Bridge
  • UI Automation

It looks like I'll need to implement one of the above APIs. Not sure what the pros and cons of each API are yet.

Creating Accessible UI components in Delphi provides details on implementing IAccessible. (Thanks for the link David)

like image 177
Shannon Matthews Avatar answered Sep 17 '22 15:09

Shannon Matthews