Skip to content

Instantly share code, notes, and snippets.

View joelhsmith's full-sized avatar

Joel joelhsmith

View GitHub Profile
@joelhsmith
joelhsmith / a11y-drupal-flexslider.js
Created June 18, 2018 16:47
Accessibility Drupal Flexslider Fix.
// # Info about Flexslider in Drupal:
// Requires jquery_update to 1.7
// Requires latest verion of Flexslider in your /libraries folder
// # Tips
// If you are using the module flexslider, this might be helpful: drupal.org/project/flexslider/issues/1580902#comment-12363103
// If you are using the module flexslider_view_slideshow, you might need this patch: drupal.org/project/flexslider/issues/1580902#comment-12363103
// If the module gives you the option to turn of aria-live, do it. Even using aria-live="polite" on a slideshow is like flipping someone off.
Drupal.behaviors.flexslider_a11y_fixes = {
@joelhsmith
joelhsmith / gist:ab8a02cf3fb32651d756b7de736a4391
Last active May 29, 2018 19:29
online-d-nav-missing-role
<ul role="navigation" id="menu-primary-header-menu" class="navbar-nav mr-auto justify-content-end top-items align-items-center d-none d-lg-flex">
<li id="menu-item-4780" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4780 nav-item">
<a href="https://online.duke.edu/our-work/">Our Work</a>
</li>
<li id="menu-item-4833" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4833 nav-item">
<a href="https://online.duke.edu/news/">News</a></li>
</li>
...
</ul>
<button class="menu-toggle fa fa-bars" type="button" value="toggle mobile nav"> &nbsp;</button>
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3434.0 Safari/537.36",
"lighthouseVersion": "2.9.4",
"generatedTime": "2018-05-18T18:01:56.973Z",
"initialUrl": "https://cats.com",
"url": "https://cats.com/",
"runWarnings": [],
"audits": {
"errors-in-console": {
"score": false,
@joelhsmith
joelhsmith / a11y-custog-config-limited.js
Last active May 18, 2018 18:02
a11y custom config example
/**
* Custom config file for running A11y audits in Lighthouse.
* Work in progress
*/
module.exports = {
passes: [{
recordTrace: true,
pauseAfterLoadMs: 5000,
useThrottling: true,
gatherers: [