MegaMenu keyboard support

UI Components for JSF
Post Reply
bercut
Posts: 8
Joined: 03 Apr 2014, 13:29

28 Aug 2015, 08:39

Hello,
currently MegaMenu doesn't support keyboard input. I hope it will be supported soon.
Still for accessibility requirements I need it. I would like to make this functionality myself, and then I could share it here.
How can I do this? Is it all done in Primefaces.js ?

Thank you!

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

28 Aug 2015, 15:28

https://github.com/primefaces/primeface ... nu/menu.js

which contains js for all menu's, so maybe there is some keyboard navigation example code in there as well

bercut
Posts: 8
Joined: 03 Apr 2014, 13:29

01 Sep 2015, 15:55

I've found the megamenu functionality in menu.js file. I have altered it a bit:

Code: Select all

...
	bindEvents : function() {
				alert("hello from bercut");
				var a = this;
...
I've put it into the primefaces.jar and have added it to my web project. In he server deployment I see the correct jar deployed.
But if I open the page with megamenu, the alert is not shown.

More over: I see only one file in the resources of the webpage in browser I see only primefaces.js file. I guess its a compilation of all .js files from the jar.

Still my functionality is not there..

Where am I wrong?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 Sep 2015, 10:10

We've added keyboard support to many components so far and likely to do it for MegaMenu soon.

bercut
Posts: 8
Joined: 03 Apr 2014, 13:29

04 Sep 2015, 17:37

Actually,
I've done it my self :)
And its working smoothly :)

Only one question: Megamenu becomes active only if I click in it with a mouse, but I cant make it active with TAB button when I switch from other controls... I'm now trying to fix this.. but any support will be highly appreciated!

Thanks!!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 52 guests