docbrown/app/javascript/packs
Marcy Sutton f072730f0f
Header navigation dropdown accessibility (#11509)
* Improve keyboard a11y of header menu dropdown

This commit also includes some cleanup of unnecessary functions that seemed to degrade performance.

Closes https://github.com/forem/forem/issues/1154

* Add temporary focus style on navigation-button

* Put menu items in a list

* Adjust menu button based on VoiceOver testing

* Refactor menu logic to be reusable/work on touch

* Preserve admin link visibility

* Focus on first item on menu open

* Clean up some HTML and CSS

* Apply suggestions from code review

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Ensure menu hides on click outside

* Rename toggle function and adjust formatting

* Update nav button focus style

* Clean up padding on header avatar focus style

* Make button show focus state for keyboard only

Using .focus-visible:focus targets keyboard focus and eliminates a flash of the blue border on click before focus is moved to the child item (which also has no focus style on mouse click)

* Update app/views/layouts/_top_bar.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Add some defensive programming

* Removed initializeTouchDevice from base.js.erb

* navigation-butt ID is now member-menu-button

* Moved all the logic from initializeTouchDevice.js into a pack file/utilities.

* committing re-ordered schema after setup

* add tests for initializeTouchDevice

* remove some unneeded html setup

* make sure menu doesn't close if user tabs back from sign out

* Revert "committing re-ordered schema after setup"

This reverts commit a41a1c861cca3b97d8a7b8a99268b8afaae9f028.

* optimized code

* small tweaks, only show outline when focused

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-01-27 09:39:17 +00:00
..
actionsPanel.js [deploy] New Feature: Mod Actions Panel (#7777) 2020-06-08 13:24:18 -04:00
admin.js Renamed internal.js pack file to admin.js (#11046) 2020-10-23 17:57:39 -04:00
analyticsArticle.js Display stats for organization article (#3232) 2019-06-19 09:17:35 -04:00
analyticsDashboard.js Dashboard Pro: support InstantClick and show org analytics (#3102) 2019-06-12 09:40:42 -04:00
articleForm.jsx [deploy] Logo updates (#10840) 2020-10-14 16:13:42 -04:00
articleModerationTools.js [deploy] [ModCenter] Fix "FlagUser" Modal functionality (#8995) 2020-07-15 13:54:52 -04:00
articlePage.jsx Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
base.js Header navigation dropdown accessibility (#11509) 2021-01-27 09:39:17 +00:00
Chat.jsx Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
clipboardCopy.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
colorPreview.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
commentModPage.js Fix broken experience level button in moderation panel (#11797) 2020-12-08 10:20:35 +01:00
contentDisplayPolicy.js Hide comment feature (#4944) 2019-12-10 15:09:47 -05:00
dashboardTagsDisableUnchangedButtons.js Update all followed tag with one click (#11454) 2021-01-05 16:15:37 +01:00
flagUserModal.jsx Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
fullScreenModeControl.js fix for code fullscreen action on comment page (#11224) 2020-11-02 10:57:45 +01:00
githubRepos.jsx Upgrade to Preact 10.4.4 (#8739) 2020-06-18 10:07:17 -04:00
homePage.jsx Report a Message in Connect (#12229) 2021-01-19 12:07:47 -05:00
homePageFeed.jsx feat: Add shortcut to bookmark an article (#11116) 2020-10-27 12:44:03 -04:00
homePageFeedShortcuts.jsx Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
listingDashboard.jsx Upgrade to Preact 10.4.4 (#8739) 2020-06-18 10:07:17 -04:00
listingForm.jsx Crayonsification of Listings form (#10429) 2020-09-30 09:14:48 +02:00
listings.jsx Upgrade to Preact 10.4.4 (#8739) 2020-06-18 10:07:17 -04:00
modCenter.jsx Mod Center MVP 🎉 (#8744) 2020-06-23 14:58:16 -04:00
notificationSubscriptionHandler.js Replace querySelector and getElementsByTagName when selecting for head and body (#8315) 2020-06-08 20:08:40 -04:00
Onboarding.jsx [deploy] Allow admins to define onboarding images in config (#8431) 2020-06-12 08:48:20 -04:00
onboardingRedirectCheck.jsx Moved src/utils out of src/ folder to utilities/ folder. (#7875) 2020-05-15 10:07:42 -04:00
orgCreditsSelector.js Crayonsification of Listings form (#10429) 2020-09-30 09:14:48 +02:00
profileDropdown.js New Feature: Block Users (#4411) 2019-10-23 17:14:28 -04:00
readingList.jsx Filter by tags of reading list items not tags you follow (#11394) 2020-11-13 10:45:32 -05:00
responseTemplates.js [deploy] Finalize and add response templates feature (#7068) 2020-04-16 15:53:29 -04:00
Search.jsx Prep work to sync mobile search in #10424 (#11525) 2020-11-30 06:13:06 -05:00
sidebarWidget.jsx Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
signupModalShortcuts.jsx Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
stickySaveFooter.js Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
validateFileInputs.js [deploy] Add valiation for file name length to file uploads (#6918) 2020-03-27 18:54:27 -04:00
videoChat.jsx Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
webShare.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00