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

[Chore] : Migrated axe-puppeteer to @axe-core/puppeteer #4482

Merged
merged 9 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Migrated dependency `axe-puppeteer v1.1.1` to `@axe-core/puppeteer v4.1.1` ([#4482](https://github.com/elastic/eui/pull/4482))
- Added `isLoading` prop and added `EuiOverlayMask` directly to `EuiConfirmModal` ([#4421](https://github.com/elastic/eui/pull/4421))

**Bug fixes**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"test-staged"
],
"dependencies": {
"@axe-core/puppeteer": "^4.1.1",
"@types/chroma-js": "^2.0.0",
"@types/lodash": "^4.14.160",
"@types/numeral": "^0.0.28",
Expand Down Expand Up @@ -115,7 +116,6 @@
"argparse": "^2.0.1",
"autoprefixer": "^9.8.6",
"axe-core": "^4.1.1",
"axe-puppeteer": "^1.1.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^24.1.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/a11y-testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

const chalk = require('chalk');
const puppeteer = require('puppeteer');
const { AxePuppeteer } = require('axe-puppeteer');
const { AxePuppeteer } = require('@axe-core/puppeteer');

const docsPages = async (root, page) => {
const pagesToSkip = [
Expand Down
6 changes: 6 additions & 0 deletions src/components/popover/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ export interface EuiPopoverProps {
* Use case is typically limited to an accompanying `EuiBeacon`
*/
arrowChildren?: ReactNode;
/**
* IDs used in ARIA and labels
*/
ariaLabelledId?: string;
myasonik marked this conversation as resolved.
Show resolved Hide resolved
}

type AnchorPosition = 'up' | 'right' | 'down' | 'left';
Expand Down Expand Up @@ -659,6 +663,7 @@ export class EuiPopover extends Component<Props, State> {
display,
onTrapDeactivation,
buffer,
ariaLabelledId,
myasonik marked this conversation as resolved.
Show resolved Hide resolved
container,
...rest
} = this.props;
Expand Down Expand Up @@ -745,6 +750,7 @@ export class EuiPopover extends Component<Props, State> {
tabIndex={tabIndex}
aria-live={ariaLive}
role="dialog"
aria-labelledby={ariaLabelledId}
myasonik marked this conversation as resolved.
Show resolved Hide resolved
aria-modal="true"
aria-describedby={ariaDescribedby}
style={this.state.popoverStyles}>
Expand Down
6 changes: 5 additions & 1 deletion src/components/tour/tour_step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
import { EuiTitle } from '../title';

import { EuiTourStepIndicator, EuiTourStepStatus } from './tour_step_indicator';
import { htmlIdGenerator } from '../../services';

type PopoverOverrides = 'button' | 'closePopover';

Expand Down Expand Up @@ -132,6 +133,8 @@ export const EuiTourStep: FunctionComponent<EuiTourStepProps> = ({
footerAction,
...rest
}) => {
const generatedId = htmlIdGenerator();
const titleId = generatedId();
if (step === 0) {
console.warn(
'EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.'
Expand Down Expand Up @@ -216,9 +219,10 @@ export const EuiTourStep: FunctionComponent<EuiTourStepProps> = ({
panelClassName={classes}
panelStyle={newStyle || style}
offset={hasBeacon ? 10 : 0}
ariaLabelledId={titleId}
arrowChildren={hasBeacon && <EuiBeacon className="euiTour__beacon" />}
{...rest}>
<EuiPopoverTitle className="euiTourHeader">
<EuiPopoverTitle className="euiTourHeader" id={titleId}>
<EuiTitle size="xxxs" className="euiTourHeader__subtitle">
<h1>{subtitle}</h1>
</EuiTitle>
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# yarn lockfile v1


"@axe-core/puppeteer@^4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@axe-core/puppeteer/-/puppeteer-4.1.1.tgz#e9dd2f2f13b717c057ff68c5943dec8d4ddd8acf"
integrity sha512-Ao9N7HL//s26hdasx3Ba18tlJgxpoO+1SmIN6eSx5vC50dqYhiRU0xp6wBKWqzo10u1jpzl/s4RFsOAuolFMBA==
dependencies:
axe-core "^4.1.1"

"@babel/cli@^7.10.5":
version "7.10.5"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.10.5.tgz#57df2987c8cf89d0fc7d4b157ec59d7619f1b77a"
Expand Down Expand Up @@ -2762,7 +2769,7 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==

axe-core@^3.5.3, axe-core@^3.5.4:
axe-core@^3.5.4:
version "3.5.5"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.5.5.tgz#84315073b53fa3c0c51676c588d59da09a192227"
integrity sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q==
Expand All @@ -2772,13 +2779,6 @@ axe-core@^4.1.1:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.1.tgz#70a7855888e287f7add66002211a423937063eaf"
integrity sha512-5Kgy8Cz6LPC9DJcNb3yjAXTu3XihQgEdnIg50c//zOC/MyLP0Clg+Y8Sh9ZjjnvBrDZU4DgXS9C3T9r4/scGZQ==

axe-puppeteer@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/axe-puppeteer/-/axe-puppeteer-1.1.1.tgz#e95f46e069d84d388cdc9fc0630cf2b2e78b1100"
integrity sha512-bU7dt3zlXrlTmaBsudeACEkQ0O4a5LNxRCdA1Qfph4mqx/DewybPCrlyDqJlHXb/W7ZSodE1fMmC+MgRLizxuQ==
dependencies:
axe-core "^3.5.3"

axios@^0.18.0, axios@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3"
Expand Down