Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Accessibility for Custom Controls
Accessibility for Custom Controls [message #482876] Fri, 28 August 2009 12:19 Go to next message
Anirudh  is currently offline Anirudh Friend
Messages: 22
Registered: July 2009
Junior Member
Hi,

I am trying to build a simple custom SWT widget and i want to ensure that
it is accessible. I have overridden the 'Canvas' class in SWT. As i
imagine, i would have to implement the accessibility listener (as is done
in CLabel?). Is there anything else i need to do?

Now, as an example, i have 3 widgets in my composite - two SWT Buttons and
my Custom Widget. The 'tab' toggles through the two buttons without
focusing on my custom control. Is there a way for a custom control to gain
focus through the cyclic tab?

Thanks,
Anirudh
Re: Accessibility for Custom Controls [message #482934 is a reply to message #482876] Fri, 28 August 2009 15:00 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Anirudh,

Adding one or more of the Accessible*Listeners to the control's Accessible
should be all that's needed to make your control accessible for screen
readers. For some examples of these see
http://www.eclipse.org/swt/snippets#accessibility .

For an example of making a Canvas tab-traversable see
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21. java .

HTH,
Grant


"Anirudh " <anirudh.chandrakant@gmail.com> wrote in message
news:731530a1758703b673a0ba02fb6fbc46$1@www.eclipse.org...
> Hi,
>
> I am trying to build a simple custom SWT widget and i want to ensure that
> it is accessible. I have overridden the 'Canvas' class in SWT. As i
> imagine, i would have to implement the accessibility listener (as is done
> in CLabel?). Is there anything else i need to do?
>
> Now, as an example, i have 3 widgets in my composite - two SWT Buttons and
> my Custom Widget. The 'tab' toggles through the two buttons without
> focusing on my custom control. Is there a way for a custom control to gain
> focus through the cyclic tab?
>
> Thanks,
> Anirudh
>
Re: Accessibility for Custom Controls [message #482963 is a reply to message #482934] Fri, 28 August 2009 18:06 Go to previous message
Anirudh  is currently offline Anirudh Friend
Messages: 22
Registered: July 2009
Junior Member
Hi Grant,

This works great!

Thanks!
Anirudh
Previous Topic:showing vertical and horizontal bar in editor
Next Topic:Resize a composite dynamically
Goto Forum:
  


Current Time: Fri Apr 26 05:51:23 GMT 2024

Powered by FUDForum. Page generated in 0.03183 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top