This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Custom config file for running A11y audits in Lighthouse. | |
* Work in progress | |
*/ | |
module.exports = { | |
passes: [{ | |
recordTrace: true, | |
pauseAfterLoadMs: 5000, | |
useThrottling: true, | |
gatherers: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # 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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Config file for running just color-contrast. | |
*/ | |
'use strict'; | |
module.exports = { | |
extends: 'lighthouse:default', | |
settings: { | |
onlyAudits: ['color-contrast'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Interactive Element Affordance | |
*/ | |
'use strict'; | |
import ManualAudit from 'lighthouse-core' | |
const ManualAudit = require('../node_modules/lighthouse/lighthouse-core/audits/manual/manual-audit'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// NOTE: I suggest using this in addition to my Fork of the Flexslider library: | |
// https://github.com/jhc36-duke-edu/FlexSlider (This Fork fixes empty link problems that cannot be fixed through the api.) | |
$('.flexslider').flexslider({ | |
slideshow: false, | |
prevText: "Previous slide", | |
nextText: "Next slide", | |
animation: "fade", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const labelCheckboxeChoices = Array.from(document.querySelectorAll('.q-checkbox')); | |
const labelRadioChoices = Array.from(document.querySelectorAll('.q-radio')); | |
var labelAllChoices = labelCheckboxeChoices.concat(labelRadioChoices); | |
labelAllChoices.forEach(function(e) { | |
if (e.innerText === '') { | |
e.remove(); | |
} | |
}); |
OlderNewer