{"action":"created","issue":{"url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/2","labels_url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/2/comments","events_url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/2/events","html_url":"https://github.com/nico3333fr/jquery-accessible-modal-window-aria/issues/2","id":61100742,"number":2,"title":"Check tab and maj-tab navigation","user":{"login":"nico3333fr","id":2578321,"avatar_url":"https://avatars.githubusercontent.com/u/2578321?v=3","gravatar_id":"","url":"https://api.github.com/users/nico3333fr","html_url":"https://github.com/nico3333fr","followers_url":"https://api.github.com/users/nico3333fr/followers","following_url":"https://api.github.com/users/nico3333fr/following{/other_user}","gists_url":"https://api.github.com/users/nico3333fr/gists{/gist_id}","starred_url":"https://api.github.com/users/nico3333fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nico3333fr/subscriptions","organizations_url":"https://api.github.com/users/nico3333fr/orgs","repos_url":"https://api.github.com/users/nico3333fr/repos","events_url":"https://api.github.com/users/nico3333fr/events{/privacy}","received_events_url":"https://api.github.com/users/nico3333fr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-13T15:32:27Z","updated_at":"2015-04-18T08:06:14Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/comments/94142536","html_url":"https://github.com/nico3333fr/jquery-accessible-modal-window-aria/issues/2#issuecomment-94142536","issue_url":"https://api.github.com/repos/nico3333fr/jquery-accessible-modal-window-aria/issues/2","id":94142536,"user":{"login":"nico3333fr","id":2578321,"avatar_url":"https://avatars.githubusercontent.com/u/2578321?v=3","gravatar_id":"","url":"https://api.github.com/users/nico3333fr","html_url":"https://github.com/nico3333fr","followers_url":"https://api.github.com/users/nico3333fr/followers","following_url":"https://api.github.com/users/nico3333fr/following{/other_user}","gists_url":"https://api.github.com/users/nico3333fr/gists{/gist_id}","starred_url":"https://api.github.com/users/nico3333fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nico3333fr/subscriptions","organizations_url":"https://api.github.com/users/nico3333fr/orgs","repos_url":"https://api.github.com/users/nico3333fr/repos","events_url":"https://api.github.com/users/nico3333fr/events{/privacy}","received_events_url":"https://api.github.com/users/nico3333fr/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T08:06:14Z","updated_at":"2015-04-18T08:06:14Z","body":"In fact, if you make a Maj tab in navigation, you should go back, but my script has a little bug that blocks it.\r\n\r\nI've found a solution (basically check all elements that are focusable, put them in a list and if you are on the first one, go to last, etc.)\r\n\r\n```\r\n            // get list of all children elements in given object\r\n            var children = $this.find('*');\r\n    \r\n            // get list of focusable items\r\n            var focusableItems = children.filter(focusableElementsString).filter(':visible');\r\n    \r\n            // get currently focused item\r\n            var focusedItem = $( document.activeElement );\r\n    \r\n            // get the number of focusable items\r\n            var numberOfFocusableItems = focusableItems.length\r\n            \r\n            var focusedItemIndex = focusableItems.index(focusedItem);\r\n\r\n            if ( !event.shiftKey && (focusedItemIndex == numberOfFocusableItems - 1) ){\r\n                focusableItems.get(0).focus();\r\n                event.preventDefault();\r\n               }\r\n            if ( event.shiftKey && focusedItemIndex == 0 ){\r\n                focusableItems.get(numberOfFocusableItems - 1).focus();\r\n                event.preventDefault();\r\n               }\r\n```\r\n\r\nJust need some time to implement :)"}}