-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from BrianSipple/improve-violation-highlight-s…
…tyles Improve Violation Highlight Styles
- Loading branch information
Showing
22 changed files
with
228 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
<style> | ||
.axe-violation { | ||
border: 2px solid red !important; | ||
background-image: repeating-linear-gradient( | ||
135deg, | ||
transparent, | ||
transparent 1.2em, /* make transparent portion somewhat wider than total stripe width */ | ||
hsla(69, 84%, 83%, 1.00) 1.2em, | ||
hsla(69, 84%, 83%, 1.00) 1.45em, | ||
hsla(166, 44%, 65%, 1.00) 1.45em, | ||
hsla(166, 44%, 65%, 1.00) 1.7em, | ||
hsla(214, 96%, 45%, 1.00) 1.7em, | ||
hsla(214, 96%, 45%, 1.00) 1.95em | ||
) !important; | ||
} | ||
|
||
.axe-violation:hover { | ||
background-image: none !important; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
"wait", | ||
"DS", | ||
"andThen", | ||
"axe", | ||
"currentURL", | ||
"currentPath", | ||
"currentRouteName" | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Ember from 'ember'; | ||
import { test } from 'qunit'; | ||
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; | ||
import sinon from 'sinon'; | ||
|
||
const { A } = Ember; | ||
|
||
const IDs = { | ||
emptyButton: '#empty-button', | ||
sloppyInput: '#sloppy-input' | ||
}; | ||
|
||
|
||
let actual, expected, sandbox; | ||
|
||
moduleForAcceptance('Acceptance | violations', { | ||
beforeEach() { | ||
sandbox = sinon.sandbox.create(); | ||
}, | ||
|
||
afterEach() { | ||
sandbox.restore(); | ||
} | ||
}); | ||
|
||
test('marking DOM nodes with violations', function(assert) { | ||
|
||
sandbox.stub(axe.ember, 'a11yCheckCallback', function (results) { | ||
actual = results.violations.length; | ||
expected = 2; | ||
|
||
assert.equal(actual, expected); | ||
|
||
const buttonNameViolation = A(results.violations).findBy('id', 'button-name'); | ||
actual = buttonNameViolation.nodes[0].target[0]; | ||
expected = IDs.emptyButton; | ||
|
||
assert.equal(actual, expected); | ||
}); | ||
|
||
visit('/violations'); | ||
|
||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Ember from 'ember'; | ||
|
||
const { Component } = Ember; | ||
|
||
export default Component.extend({ | ||
attributeBindings: ['data-test-selector'] | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import BaseDemoComponent from './_base-demo-component'; | ||
|
||
export default BaseDemoComponent.extend({ | ||
classNames: ['button'], | ||
tagName: 'button' | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import BaseDemoComponent from './_base-demo-component'; | ||
|
||
export default BaseDemoComponent.extend({ | ||
tagName: 'input', | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.button { | ||
background-color: aqua; | ||
border-radius: 0.25em; | ||
border: none; | ||
min-height: 1.5rem; | ||
height: 1.5rem; | ||
|
||
width: 2.2rem; | ||
min-width: 2.2rem; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h2 id="title">Welcome to Ember.js</h2> | ||
<h2 id="title">Welcome to Ember</h2> | ||
|
||
{{passing-component}} | ||
{{outlet}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{yield}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{yield}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{{passing-component data-test-selector="passing-input"}} | ||
{{outlet}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{empty-button id="empty-button" data-test-selector="empty-button"}} | ||
|
||
{{sloppy-input id="sloppy-input" data-test-selector="sloppy-input"}} |
Oops, something went wrong.