Community
Participate
Working Groups
Created attachment 205364 [details] Patch to fix 2 accessibility problems in CTabFolder The attached patch fixes 2 accessibility problems in the e4 CTabFolder: 1) The min, max, and chevron buttons now have accessible names. 2) The keyboard shortcut for switching pages in a CTabFolder (ctrl+PageUp) is now available to screen readers and it can be announced (supported in JAWS 12 and up). In addition, the patch removes a few lines of code that were not being used.
After applying the patch, please change the getKeyboardShortcut method to the following (really only changes 2 lines). This removes the hard-coded strings for NLS purposes. You need the latest SWT.java and SWTMessages.properties for this NLS fix to work. public void getKeyboardShortcut(AccessibleEvent e) { String shortcut = null; int childID = e.childID; if (childID >= 0 && childID < items.length) { String text = items[childID].getText(); if (text != null) { char mnemonic = _findMnemonic(text); if (mnemonic != '\0') { shortcut = SWT.getMessage ("SWT_Page_Mnemonic", new Object[] {new Character(mnemonic)}); //$NON-NLS-1$ } } } if (childID == ACC.CHILDID_SELF) { shortcut = SWT.getMessage ("SWT_SwitchPage_Shortcut"); //$NON-NLS-1$ } e.result = shortcut; }
One more. Please change the getChildAtPoint method to the following, so that the hit test does the right thing (this is only a one-line change): public void getChildAtPoint(AccessibleControlEvent e) { Point testPoint = toControl(e.x, e.y); int childID = ACC.CHILDID_NONE; for (int i = 0; i < items.length; i++) { if (items[i].getBounds().contains(testPoint)) { childID = i; break; } } if (childID == ACC.CHILDID_NONE) { Rectangle location = getBounds(); location.x = location.y = 0; location.height = location.height - getClientArea().height; if (location.contains(testPoint)) { childID = ACC.CHILDID_SELF; } } e.childID = childID; }
Created attachment 205461 [details] additional patch that covers comment 1 and comment 2 This additional patch is identical to pasting in the 2 methods mentioned in comment 1 and comment 2.
ping Please apply the patch in comment 0, and then apply the patch in comment 3. Thanks!
Patch(es) applied. Thanks Car! Fixed in HEAD > 20120305 http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=cfd660823e5cba918ade43a0bd98ce8d102e7305