docbrown/docs/frontend
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
..
accessibility.md Start a11y testing checklist in Forem docs (#11614) 2020-11-25 14:22:50 -05:00
debugging.md Add Preact dev tools to development bundles (#11459) 2020-11-18 14:20:58 +01:00
dynamic-imports.md Fixed broken link, replaces file links with permalinks (#9334) 2020-07-16 07:41:07 -05:00
instant-click.md Update docs with Forem instead of dev.to (#9316) 2020-07-15 13:29:11 -04:00
linting-formatting.md Update docs with Forem instead of dev.to (#9316) 2020-07-15 13:29:11 -04:00
liquid-tags.md Upgrade rubocop* packages to the latest version and fix violations (#11972) 2020-12-21 18:29:43 +01:00
plain-js.md Header navigation dropdown accessibility (#11509) 2021-01-27 09:39:17 +00:00
preact.md Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
readme.md Switch node-sass to dart-sass (#11873) 2020-12-14 22:06:06 -05:00
styles.md Update docs with Forem instead of dev.to (#9316) 2020-07-15 13:29:11 -04:00
tips.md Use faster JS selection methods (#11409) 2020-11-16 17:35:50 +01:00
tracking.md Fixing links to tracking section in docs (#10326) 2020-09-15 16:35:50 -05:00
webpacker.md Added webpack bundle analyzer (#12013) 2020-12-22 19:13:40 -05:00

items
plain-js.md
webpacker.md
preact.md
instant-click.md
dynamic-imports.md
styles.md
linting-formatting.md
liquid-tags.md
debugging.md
tracking.md
accessibility.md
tips.md

Frontend Guide