Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Axe testing #3035

Merged
merged 3 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/a11y-testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ const docsPages = async (root, page) => {
`${root}#/forms/range-sliders`,
`${root}#/display/progress`,
`${root}#/display/loading`,
`${root}#/utilities/accessibility`,
`${root}#/utilities/context`,
`${root}#/utilities/copy`,
`${root}#/utilities/delay-hide`,
`${root}#/utilities/delay-render`,
`${root}#/utilities/highlight`,
];

links = [...links, ...reflinks];
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/accessibility/screen_reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default () => (
<div>
<EuiText>
<EuiTitle size="xxs">
<h4>Visually hide content</h4>
<h3>Visually hide content</h3>
</EuiTitle>
<p>
<em>
Expand Down
14 changes: 8 additions & 6 deletions src-docs/src/views/context/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ export default class extends Component {
<EuiSpacer size="m" />

<EuiI18n
tokens={['euiContext.question', 'euiContext.action']}
defaults={['What is your name?', 'Submit']}>
{([question, action]) => (
tokens={[
'euiContext.question',
'euiContext.action',
'euiContext.placeholder',
]}
defaults={['What is your name?', 'Submit', 'John Doe']}>
{([question, action, placeholder]) => (
<Fragment>
<EuiFormRow label={question}>
<EuiI18n token="euiContext.placeholder" default="John Doe">
{placeholder => <EuiFieldText placeholder={placeholder} />}
</EuiI18n>
<EuiFieldText placeholder={placeholder} />
</EuiFormRow>

<EuiSpacer />
Expand Down
9 changes: 4 additions & 5 deletions src-docs/src/views/copy/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
EuiButton,
EuiFieldText,
EuiSpacer,
EuiFormRow,
} from '../../../../src/components/';

export default class extends Component {
Expand All @@ -21,11 +22,9 @@ export default class extends Component {
render() {
return (
<div>
<EuiFieldText
placeholder="Enter text that will be copied to clipboard"
value={this.state.copyText}
onChange={this.onChange}
/>
<EuiFormRow label="Enter text that will be copied to clipboard">
<EuiFieldText value={this.state.copyText} onChange={this.onChange} />
</EuiFormRow>

<EuiSpacer size="m" />

Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/highlight/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { Component, Fragment } from 'react';
import {
EuiHighlight,
EuiFieldSearch,
EuiFormRow,
EuiSpacer,
EuiSwitch,
} from '../../../../src/components';
Expand Down Expand Up @@ -32,7 +33,9 @@ export class Highlight extends Component {
const { searchValue, isHighlightAll } = this.state;
return (
<Fragment>
<EuiFieldSearch value={searchValue} onChange={this.onSearchChange} />
<EuiFormRow label="Enter text to highlight substrings within a string">
<EuiFieldSearch value={searchValue} onChange={this.onSearchChange} />
</EuiFormRow>

<EuiSpacer size="m" />
<EuiSwitch
Expand Down