Last active
July 13, 2018 19:23
-
-
Save joelhsmith/0ceeff9393c1bfde6af2f00ebfb89b7d to your computer and use it in GitHub Desktop.
Interactive element manual audit for Lighthouse
This file contains hidden or 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'); | |
/** | |
* @fileoverview Manual A11y audit for interactive link states. | |
*/ | |
class LinkStates extends ManualAudit { | |
/** | |
* @return {LH.Audit.Meta} | |
*/ | |
static get meta() { | |
return Object.assign({ | |
name: 'interactive-element-affordance', | |
helpText: 'Interactive elements like links and buttons should indicate their state and be distinguishable from non-interactive elements. It is difficult for users to navigate a website when they cannot tell if an element is clickable or when they are hovering over an interactive element. [Learn more](https://webaim.org/blog/wcag-2-0-and-link-colors/).', | |
description: 'Interactive elements are distinguishable from non-interactive elements', | |
}, super.partialMeta); | |
} | |
} | |
module.exports = interactiveElementAffordance; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment