Configure Xdebug for PhpStorm On IIS

I was unlucky enough as JetBrain’s PhpStorm no configuration for xdebug did not work for me. So I was looking for a way to configure xdebug for PhpStorm on IIS. Apparently not much help is available. If you are facing the same issue, follow the following steps:

  1. Download the appropriate xdebug dll file from the xdeug wizard.
  2. Copy xdebug dll file to C:\Program Files (x86)\PHP\v5.3\ext\
  3. Add the following to php.ini file
    [XDebug]
    zend_extension="C:\Program Files (x86)\PHP\v5.3\ext\php_xdebug-2.2.1-5.3-vc9-nts.dll"
    xdebug.remote_enable=1
    
  4. Restart IIS
  5. Open PHPStorm and Select “Craete New Project Using Existing Files”.
  6. Select Scenario: “Web server is installed locally, source files are located under its document root”. Select this scenario even if you use virtual directory for your web-application. Click Next button.
  7. Provide the path to project root folder. It would be the same location where source of your web-application resides. Click on the “Project Root” button and click Next.
  8. Select “Add New Local Server” and click Next button.
  9. Provide a name for the local server (e.g. IIS) and the webserver root url (e.g. http://localhost/ or http://localhost:8080/ if you have changed IIS port). Click on Next button.
  10. Check “Review PHP settings”.
  11. In “Web path for project root”, type the url path that is used to access this application. E.g. if you use http://localhost/blog/, you would type “blog” (without quotes) into this field. After typing check that Project URL displays the same URL that you type in browser to access the web-application. Click Next button.
  12. Select the row containing “C:\pear\” and click the – button on right. The row would disappear.
  13. Click the + button on right and browse to the path where php for IIS is installed (Usually C:\Program Files (x86)\PHP\v5.3\). Click Finish.
  14. Now click on the “Start listen PHP Debug connection” button in PHPStrom toolbar.
  15. Open the browser and type the web-application url e.g. http://localhost/blog/
  16. If everything went as directed, you would see a “Incoming connection from xdebug” prompt. Click the accept button and Debug!!!

I am publishing these steps in the hope that it would be useful to someone one on the earth trying hard to configure Xdebug on PhpStrom.

If you think I missed anything or any step is confusing, let me know in comments.

[Windows] Use Ctrl+V Shortcut As Paste in Git-Bash

I love git bash. But its annoying that on windows, the paste shortcut key is not Ctrl+V but Insert. I know that one can use the Edit -> Paste menu but still leaving keyboard and using touchpad is annoying.

Here is the AutoHotKey snippet to enable Ctrl+V on not only git bash window but also on cmd window:

; Enable Ctrl+V in Command Prompt, Git-Bash Window
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#IfWinActive ahk_class ConsoleWindowClass
	^V::

    WinGetTitle, active_title, A

    if active_title contains git-cheetah
      ;Paste key for Git bash window is INSERT
      SendEvent {Insert}
    else
      SendInput {RAW}%clipboard%
      
		return

#IfWinActive

Copy Urls Expert Version 2.0.0 Released

I have just submitted v 2.0.0 of Copy urls Expert to AMO. Version 2.0.0 can be downloaded from All Versions page of Copy Urls Expert on AMO as it might take some time before AMO reviewers approve this version for download Copy Urls Expert page on AMO.

Following is the featutures implemented in this version:

  1. [User Request] Added an option to allow copy of active tab url. This is particularly useful with the toolbar button
  2. [User Request] Rahul reported that when opening several links with Open Links, the browser just hang. A delay is introduced to improve performance in this case. By default, this is 80 milliseconds but it is configurable by extensions.copyurlsexpert.opentabdelaystepinmillisecs
  3. Now when you click Open Links option, it will not display a dialog. Instead, links are directly detected from clipboard and opened.
  4. Improved Options dialog appearance and added Help tab.
  5. Toolbar button image now honors small and large icons mode

Remember that you can always drop me a line at Copy Urls Expert Feedback page.

High Contrast Mode

Our second goal towards accessibility is to improve the readability of visual and textual information of application.Assume that target end users for this post have some vision impairment. Visual impaired users respond differently to different contrast settings. Some of them prefer sharp, well-defined contrasts while others choose more muted contrast colors. Therefore, foreground and background color settings should offer proper contrast setting so that it is easier for user to read and understand application messages.

Windows operating systems provide this functionality through High contrast mode.From Control panel, it is set through Accessibility Options in XP, Ease of Access Center in Windows 7 and other equivalent facilities in other version of windows.

It is toggle on/off through this hot-Key
Press left ALT left SHIFT Print Screen

Supporting High Contrast mode

While designing you application, consider following points:

  1. Use system color scheme. Do not hard code hexadecimal values for foreground and background properties. In case of custom color scheme, allow the user to override it with user-selected contrast and color scheme.

    Do not hard code color

  2. Do not rely on color alone, because user who cannot distinguish the color will not have access to that information.Convey information through other means often it is done through visual cue or sound.
    In the below image, users who can distinguish red color will not be able to identify required field.

    Never rely on Color only.

  3. Alternative color should be used for high-contrast setting, as shown in the image.

    Use alternative icon for high contrast mode.

  4. Remove background images or patterns, such as watermarks, so that text is visible.
    In below figure, user cannot read the label text because of background image,in high contrast mode.

    Remove background Image/Pattern

Walk through

For making your application to work effectively in HighContrast Mode, follow these steps .Consider sample application used in Keybaord Navigation.

  1. Create ColorScheme Method: First create a method to set color scheme of online casino controls according to systems color. Determine whether the High Contrast mode is on/off by using SystemInformation.HighContrast property and assign the color accordingly. Systems colors can be selected through SystemColors class.
    &amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    private void SetColorScheme()&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br Sie werden Steckplatze fur Spieler, die die Aufregung von &lt;a href=&quot;http://germanonlinecasinos.com/spielautomaten&quot;&gt;Spielautomaten&lt;/a&gt; Liebe zu finden, werden Sie Roulette-Tischen fur reine Glucksspiele, sowie die Spannung von den Raumen, in denen Karten Blackjack und Poker-Spieler sperren Horner mit dem Haus und miteinander in einem Angebot finden Topf zu akzeptieren oder verdoppeln ihr Geld. /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 this.lblMode.Text = SystemInformation.HighContrast?&amp;amp;amp;amp;amp;amp;quot;HighContrast Mode&amp;amp;amp;amp;amp;amp;quot;:&amp;amp;amp;amp;amp;amp;quot;Normal Mode&amp;amp;amp;amp;amp;amp;quot;;&amp;amp;amp;amp;amp;lt;br &amp;amp;amp;amp;lt;a href=&amp;amp;amp;amp;quot;http://playfuddle.com/&amp;amp;amp;amp;quot; &amp;amp;amp;amp;gt;http://playfuddle.com/&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt; /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 if (SystemInformation.HighContrast)&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br &amp;lt;a href=&amp;quot;http://www.jameshallison.com/&amp;quot;&amp;gt;casino jameshallison&amp;lt;/a&amp;gt; /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.lblFirstName.Image = null;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.txtBxAddress.BackColor = SystemColors.Window;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.txtBxAddress.ForeColor = SystemColors.WindowText;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.pictureBox1.Image = global::Sample3.Properties.Resources.HighCntrastDocument;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 else&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.lblFirstName.Image = global::Sample3.Properties.Resources.BANR075;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.pictureBox1.Image = global::Sample3.Properties.Resources.Document2;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.txtBxAddress.BackColor = System.Drawing.Color.Red;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		this.txtBxAddress.ForeColor = System.Drawing.Color.Green;&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	 }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    

    Set the color Scheme when the application starts i.e. in the constructor and when SystemInformation.HighContrast is changed dynamically.

  2. Hook up UserPreferenceChanged Event Procedure: Use SystemEvents.UserPreferenceChanged event to respond the change SystemInformation.HighContrast.Register the event in the constructor.
    &amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    public DemoForm()&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	InitializeComponent();&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	SetColorScheme();&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	Microsoft.Win32.SystemEvents.UserPreferenceChanged = new&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		Microsoft.Win32.UserPreferenceChangedEventHandler(OnSystemEvents_UserPreferenceChanged);&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    
  3. Respond to UserPreferenceChanged Event: Set the color scheme whenever SystemInformation.HighContrast value is changed.
    &amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    void OnSystemEvents_UserPreferenceChanged(object sender,&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    					Microsoft.Win32.UserPreferenceChangedEventArgs e)&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	SetColorScheme();&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    
  4. UnHook UserPreferenceChanged Event: Remember SystemEvents are static and they can be called on even after dispose or can hold strong reference of object until application exit. It is better to unsubscribe the event in dispose in order to avoid potential memory leaks.
    &amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    protected override void Dispose(bool disposing)&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    {&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	Microsoft.Win32.SystemEvents.UserPreferenceChanged -= new&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		Microsoft.Win32.UserPreferenceChangedEventHandler(OnSystemEvents_UserPreferenceChanged);&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	if (disposing &amp;amp;amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp;amp;amp; (components != null))&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	{&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    		components.Dispose();&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	}&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    	base.Dispose(disposing);&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    }&amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
    

Testing High Contrast Mode

Turn on High contrast mode before running the application and check following points:

  1. All UI elements and controls should be visible.
  2. Active and inactive selection appearance should be differentiable
  3. In high contrast mode visual focus should be available.
  4. If your application supports multiple schemes function, verify all.
  5. No text truncation occurs.
  6. There should be no hard-coded colors.

Download source code.

Keyboard Navigation

This is the first installment of the series and the easiest one too ;)

Our today’s goal is to make our sample application accessible when only keyboard is available as input device. It will ease the users with vision or motor disabilities.

There are several ways to implement effective keyboard navigation in your desktop application like

  1. Tabbing
  2. Shortcut Keys
  3. Access Keys
  4. Menus

i. Tabbing

Tab Key is the primary mechanism for navigating within a window. Tabbing must be logical and consistent with language in which UI is written. Tab Key moves input focus to the next control in tab order, whereas SHIFT TAB moves input focus to the previous control

In order to set tab order of controls and to receive input focus, TabStop property of control must be true while sequence or order of receiving focus can be set by TabIndex property.

As shown in the Figure1, navigation is from left to right. If your UI is written in right to left language then order would be accordingly.

Points to Remember:

  1. Use Tab to move input focus from one UI element to another
  2. Use SHIFT TAB to traverse back.

Tab Key should move from Left to Right.

ii. Shortcut Keys

Keyboard users can use key or combination of keys to access frequently performed actions quickly by using the keyboard. As shown below CTRL F will execute find command. While choosing shortcut keys assign simple and consistent key combination and prefer CTRL letter or Fn keys.

Points to Remember:

As the shortcut keys are memorized by frequent users, try to follow the standards when assigning shortcut keys. Follow these guidelines for selecting shortcut keys:

  • Use SHIFT key combination to complement or extend action of standard key. For instance ALT TAB displays the primary window of running application, where as SHIFT ALT TAB allow you to navigate backward.
  • All shortcut key used by the application should be properly documented in tooltips, menus and Help,as shown in below image.

  • Assign shortcut key to most frequently used features by end users. Infrequently used features do not need shortcut keys as user can access them through access key.
  • Do not assign non-standard functionality to standard shortcuts such as Ctrl C, Ctrl X or Ctrl A.
  • Do not use
    • ALT letter, as they may conflict with access key.
    • CTRL ALT combinations Det ar ganska erkant att roulette kommer fran Frankrike aven om vissa fortfarande tycker sig tro roulette har aldre anor an sa. because in some language versions system interpret it as an ALTGR key, which generates alphanumeric characters.
    • Windows log key as modifier key for non-system level functions.
    • Shortcut keys which are reserved by system or commonly used by other applications.

    Shortcut key for Paste is Ctrl V while Access key is P

iii. Access Keys

Keyboard users have also alternative to access UI element without using tab key VikingSlots – ta fram vikingen i dig, och vinn stort redan idag!Det heter ju att kart barn har manga namn, och nog stammer det nar vi pratar om de populara spelautomater na, video slots, enarmad banditer eller vad du valjer att kalla de. i.e.  Access Keys. Access Keys are alphanumeric keys used in conjunction with ALT key for accessibility to interact with all menu items or controls.

  • It is assigned by placing an ampersand “&’, in There are basic rules that players can learn about roulette on line to enhance their enjoyment of the game, but none that can identify winning techniques. the text of the control, before the letter, which would be the access key.

Setting access key and shortcut key in properties window

  • Buttons labeled OK, Cancel, and Close aren”t assigned access keys because they are invoked with Enter and Esc keys. However assign access key to a control that performs OK/Cancel functionality but conjure up with different label.
  • Windows indicates access keys by underlining the access key assignment and documented only in tooltips or texts, therefore selection of access key must be done with conscientious so that user can easily find the access key in control ‘s text.

Points to Remember

  • Prefer first or second letter of the word, as it would be easy to discover.
  • Use letter with wide width like those which are more than one pixel wide.
  • Select distinct consonant or a vowel.
  • Access must unique within the same menu level.
  • Assign access keys to all menus and most controls.
  • If there are some command that are common in most application then try to use the standard one  like use B for Back and N for Next in wizard Pages. Similarly “A ” for apply command.
  • For dynamic menus use access key numerically .e.g. recently used files.
  • Avoid using letter with descender like p q g, y, as it would be difficult to find.

4. Menu

Menus and dialog boxes are two most common and standardized UI elements in Win Form. During accessibility implementation ensure that user can enter and exit menu using ALT key or dialog boxes. User can either navigate to menu through arrow keys or can use shortcuts to invoke the functionality.

How to Test Keyboard Accessibility?

It‘s so simple just unplug your mouse and put it in a place where your hand can’t reach it. Now try to use the application.

Do you like the article? Is there anything that I missed or needs more explanation. Then do leave a comment. I would love to hear the feedback.

Windows Form Accessibility

The intent for writing this article is to share the experience with developers who are working on Section508 compliance or anyone who wants to make the product usable to everyone. Though abundant of information about accessibility is available on net but scattered and quite difficult for a developer to begin with accessibility. In this article, I will try to cover basic understanding of accessibility from implementation point of view. Hope it will save someone some hair pulling.

I am assuming that you are familiar with basics of Windows Form Development.

Section 508 – It”s the law:

Section 508 of the Rehabilitation Act:
      “All electronic and information technology used,procured, developed,or maintained by agencies and departments of the U.S. Governments must be accessible to people with disabilities.”

What is Accessibility?

To sum up this article, your application would be accessible aftbonus when it is usable to everyone. Your end-user may be cognitive disabled or may be they’re deaf or blind or handicapped person. It is also possible that they have some hearing impairments or they need high prescription eyeglasses to read but still they find your application easy to use.

Accessibility is the super set of Section508

Section508  is not same as the accessibility. The United State”s law provides a minimum standard for accessibility, and obviously adhering to minimum online casinos standard does not make your application fully accessible.

Does your application conform minimal set of accessibility?

In order to know whether you application is 508 complaint or not, you had better go through this checklist:

  • Your application should render properly, when system’s font, size, color or input settings are changed from control panel.
  • High contrast mode should not have any impact on readability of application.
  • All features of your application should be accessible through keyboard solely.
  • It should highlight the location of current of input focus.
  • Screen reader should be able to read what is displayed in your application’s screen in order to facilitate the blind users.
  • You application should provide auditory information by other means like flashing title bar or displaying information in non modal window etc.

If all the above points are checked. Bingo!!! You do not need to worry about section 508. Else you need a little work out.

Here, I will discuss three basic categories of accessibility outlined in Section508:

  1. Keyboard Navigation
  2. High Contrast
  3. Accessibility feature with Narrator