Note: both slides include the title 1194.21(c) Focus and a Department of Veterans Affairs logo.
The next regulation is about the tracking of focus. Focus is what enables a user to know where they are within your application.
There are two things you need to think about here. You need to, one, visually make focus able to be discovered within your application, using some type of UI, either a focus rectangle or a blinking caret, to indicate that the item currently has focus. The focus also needs to be available programmatically to a screen reader or other assistive technology. We will show you an example of how to test that this event is being raised.
The key thing when working with this regulation is to make sure you use standard Delphi controls. I'm going to keep saying this throughout the presentation, and it just helps to save you a lot of work in the long run.
If you use the standard controls that ship with Delphi or other UI platforms, typically the work has been done to make those controls meet all of these regulations. For example, the standard Delphi controls do all of the requirements of focus, themselves. You do need to be careful when using custom controls or if you significantly modify the default behavior of a standard control.
If you have really developed a new custom control, you will have to get down into the Windows level event system and raise an OBJ_FOCUS event when focus is moved to your control and/or item within your control.