? Success

User tests: Successful: Unsuccessful:

avatar ylahav
ylahav
9 Dec 2018

Pull Request for Issue # .

Summary of Changes

adding keyboard navigation to menu

Testing Instructions

create different types of menus (with sub-menus and without)
Reach (with 'tab') the menu under test and check the following behavior:

  • right arrow - next item (same level). If last - back to first item
  • left arrow - prevision item (same level) . if first - go to last item
  • down arrow - if sub-menu exist - go to sub level, first item
    - if not - behave as right arrow
  • up arrow - if first item in sub-menu - go to parent item
    - if not first item or no parent item - same as left arrow

Expected result

The behavior was explained above

Actual result

Documentation Changes Required

avatar ylahav ylahav - open - 9 Dec 2018
avatar ylahav ylahav - change - 9 Dec 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2018
Category Unit Tests Repository Administration com_admin
avatar ylahav ylahav - change - 9 Dec 2018
The description was changed
avatar ylahav ylahav - edited - 9 Dec 2018
avatar ylahav ylahav - change - 9 Dec 2018
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 10 Dec 2018

me thinks there are some files missing

avatar ylahav
ylahav - comment - 10 Dec 2018

@brianteeman - Yes, I realize it... I will commit the missing file soon

avatar ylahav ylahav - change - 15 Dec 2018
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2018
Category Unit Tests Repository Administration com_admin JavaScript Repository Modules Front End
avatar ylahav ylahav - change - 15 Dec 2018
Labels Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 16 Dec 2018

Please move the script to media_src and convert it to ES6

avatar brianteeman
brianteeman - comment - 16 Dec 2018

This code does a lot more than adding the keyboard arrow support you describe. It is also adding various markup that really should be part of the view not the js - otherwise it cant easily be overriden. Also you really should have documented those markup changes in the original report so that they can be tested correctly.

avatar ylahav
ylahav - comment - 22 Dec 2018

This code does a lot more than adding the keyboard arrow support you describe. It is also adding various markup that really should be part of the view not the js - otherwise it cant easily be overriden. Also you really should have documented those markup changes in the original report so that they can be tested correctly.

I Agree. The markup left from a plugin I am writing to old versions of Joomla where markup will be added as well... I will remove it from the code.

avatar ylahav ylahav - change - 22 Dec 2018
Title
Amenu
[4.0][a11y] Amenu
avatar ylahav ylahav - edited - 22 Dec 2018
avatar dgrammatiko
dgrammatiko - comment - 22 Dec 2018

FWIW this is still not es6. Try to lint the script and you’ll figure out what needs to be done

avatar ylahav
ylahav - comment - 22 Dec 2018

FWIW this is still not es6. Try to lint the script and you’ll figure out what needs to be done

I did it with - https://jshint.com. can you recommended another lint?

avatar dgrammatiko
dgrammatiko - comment - 22 Dec 2018

Just exetute the one in the repo:

  • npm run lint:js
avatar wilsonge
wilsonge - comment - 29 Dec 2018

@dgrammatiko our linter runs fine against this too (see the drone results since i just merged in staging)

EDIT: Ignore me @ylahav can you edit the file name to be .es6.js please

avatar wilsonge
wilsonge - comment - 30 Dec 2018

Updated to joomla code standards

avatar dgrammatiko
dgrammatiko - comment - 30 Dec 2018

This is still not ES6...

avatar wilsonge
wilsonge - comment - 30 Dec 2018

Then you need to explain in more detail what the issue is because as you can see from the drone output, it is happy with the linter

avatar ylahav
ylahav - comment - 30 Dec 2018

I agree with Brian and will fix it. No need to explain...

On Sun, 30 Dec 2018, 15:35 George Wilson <notifications@github.com wrote:

Then you need to explain in more detail what the issue is because as you
can see from the drone output, it is happy with the linter


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#23254 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGOuEwl3auKSJ-VkIb3dKzmPRBhZyWl9ks5u-MEsgaJpZM4ZKYUk
.

avatar brianteeman
brianteeman - comment - 30 Dec 2018

Surely the js should be included in the tmpl - otherwise it can't be overridden

See this as an example

HTMLHelper::_('script', 'com_finder/finder.js', array('version' => 'auto', 'relative' => true));

avatar ylahav
ylahav - comment - 11 Jan 2019

What more I have to do in order this change will be included in J4?

avatar brianteeman
brianteeman - comment - 11 Jan 2019

It needs tests - presumably as the a11y team leader you can get the team members to test this

avatar dgrammatiko
dgrammatiko - comment - 11 Jan 2019

@ylahav FWIW having 3 different scripts to render a menu is not the right way...

avatar ylahav
ylahav - comment - 11 Jan 2019

@ylahav FWIW having 3 different scripts to render a menu is not the right way...

@dgrammatiko I know only about one - menu.es6.js (that after George rename mine)... what I miss here, thanks!

avatar ylahav
ylahav - comment - 11 Jan 2019

It needs tests - presumably as the a11y team leader you can get the team members to test this

@brianteeman - thanks - I asked them

avatar dgrammatiko
dgrammatiko - comment - 11 Jan 2019

Yes ther is one more in the module menu and another script called metis menu. Also I’m not sure if this menu doesn’t have any dependency on bootstrap.js as I’m observing some classes there.
And finally some comments on the actual code: you’re traversing the dom way too much you shouldn’t! This will be laggy in any low end mobile

avatar brianteeman
brianteeman - comment - 11 Jan 2019

Should it even be active on a mobile?

avatar ylahav
ylahav - comment - 12 Jan 2019

Should it even be active on a mobile?

Good question - I don't think it "give" something if it is active in mobile....

avatar ylahav
ylahav - comment - 12 Jan 2019

@dgrammatiko - metismenu is used only in the administrator menu... so for the FE it is not applicable...

avatar chmst
chmst - comment - 15 Jan 2019

I have tested this item successfully on c56c089


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23254.

avatar chmst
chmst - comment - 15 Jan 2019

I have tested this item successfully on c56c089


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23254.

avatar chmst chmst - test_item - 15 Jan 2019 - Tested successfully
avatar Hackwar
Hackwar - comment - 16 Jan 2019

I have tested this item successfully on c56c089

I can tab through the page and navigate through the menu. Looks nice.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23254.

avatar Hackwar Hackwar - test_item - 16 Jan 2019 - Tested successfully
avatar fancyFranci
fancyFranci - comment - 27 Feb 2019

@ylahav I would really like to see this merged. Please could you solve the remaining issues? :)

avatar ylahav
ylahav - comment - 27 Feb 2019

I am in vacation until March 10... Will do it when coming back home..

On Wed, 27 Feb 2019, 20:14 Franciska Perisa, notifications@github.com
wrote:

@ylahav https://github.com/ylahav I would really like to see this
merged. Please could you solve the remaining issues? :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#23254 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGOuE2Ybd63NSZ1oE7hdK6mECvsHmHkDks5vRoS2gaJpZM4ZKYUk
.

avatar bembelimen
bembelimen - comment - 17 Mar 2019

@ylahav can we support you in any way? I really like what you did here and would like to have it in Joomla!

avatar HLeithner
HLeithner - comment - 17 Mar 2019

@ylahav are you back and can fix the remaining issues?

avatar ylahav
ylahav - comment - 17 Mar 2019

@ylahav are you back and can fix the remaining issues?

Yes, I am back and will fixed it this week

avatar wilsonge
wilsonge - comment - 18 Mar 2019

I'm merging this as it is to clear the path for those who want this in. If someone could make a PR here to solve the issue mentioned here with the target element it would be useful #23254 (comment)

Thanks @ylahav !

avatar wilsonge wilsonge - change - 18 Mar 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-03-18 13:50:15
Closed_By wilsonge
avatar wilsonge wilsonge - close - 18 Mar 2019
avatar wilsonge wilsonge - merge - 18 Mar 2019
avatar brianteeman
brianteeman - comment - 18 Mar 2019

grrh - what was the rush to merge broken code

avatar wilsonge
wilsonge - comment - 18 Mar 2019

What's broken about it? I see the anonymous function issue addressed since the 2 good tests. The fact it's got a slightly generic selector didn't seem to cause any issues when testing - it's sub-optimal for sure - but doesn't appear to be breaking anything immediately. And it's simple to add a fix for.

avatar wilsonge
wilsonge - comment - 18 Mar 2019

I retract the above. After merging in 4.0 the file was in the wrong place - fixed - d2098c0

avatar brianteeman
brianteeman - comment - 18 Mar 2019

I still dont see what the rush was

avatar dgrammatiko
dgrammatiko - comment - 18 Mar 2019

Still broken for IE. IE doesn't support iteration over node collections (eg document.querySelectAll IS NOT an array and you cannot iterate it on IE).

Also, this script is traversing the DOM on each event, this is plain wrong as is a performance hog if you ever get a reasonable menu...

Also not IIFE as requested by @Fedik...

avatar brianteeman
brianteeman - comment - 18 Mar 2019

As it has only just been merged please revert it so that it can be fixed BEFORE it enters the codebase

avatar mbabker
mbabker - comment - 18 Mar 2019

Also not IIFE as requested by @Fedik...

Yes it is. The change request was not marked reviewed, completed, or whatnot.

Still broken for IE. IE doesn't support iteration over node collections (eg document.querySelectAll IS NOT an array and you cannot iterate it on IE).

I'm not seeing this issue noted in this PR, so kind of hard for someone to address an unknown issue. That would've been helpful feedback in December with your "this is not ES6" comments.

avatar brianteeman
brianteeman - comment - 18 Mar 2019

@wilsonge you have committed this with the git commit message of
[4.0][a11y] Improve accessibility of the admin menu (#23254)

This is NOT for the admin!!

avatar brianteeman
brianteeman - comment - 18 Mar 2019

I can confirm that this does not work in
IE11
Edge

Console with Edge reports SCRIPT5022: SCRIPT5022: SyntaxError

avatar bembelimen
bembelimen - comment - 19 Mar 2019

I looked into the JS and fixed most of the IE11 issues:

  • querySelectorAll => [].slice
  • correct selector (instead of .nav)

Still working on:

  • :scope call, which does not work in IE11
  • the classes where I'm not sure if they're needed

Will do a PR when everything is resolved

avatar brianteeman
brianteeman - comment - 19 Mar 2019

thank you

avatar dgrammatiko
dgrammatiko - comment - 19 Mar 2019

@bembelimen fwiw I would create a class and in the constructor, I would cache ALL the elements in some arrays. Then the event listeners won't have to traverse the DOM on each call, instead, they will do whatever is needed to the appropriate element(s) from the cache. Properly done...

Add a Comment

Login with GitHub to post a comment