Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d89741a
feat(plugin-axe): add plugin scaffolding
hanna-skryl Nov 4, 2025
44bc1af
feat(plugin-axe): add metadata transformations
hanna-skryl Nov 5, 2025
f15817b
feat(plugin-axe): add plugin configuration validation
hanna-skryl Nov 5, 2025
4ba86c7
refactor(models,utils): extract shared URL utilities for plugins
hanna-skryl Nov 5, 2025
d9d0a6e
feat(plugin-axe): add audits and groups processing
hanna-skryl Nov 6, 2025
1281873
feat(plugin-axe): implement runner with Playwright/Axe integration
hanna-skryl Nov 6, 2025
91e52de
feat(utils,plugin-axe): improve report formatting
hanna-skryl Nov 7, 2025
6e6e304
test(plugin-axe): add E2E snapshot tests
hanna-skryl Nov 7, 2025
ecf9e21
feat(plugin-axe): add plugin setup
hanna-skryl Nov 7, 2025
066a1f5
docs(plugin-axe): add README and plugin metadata
hanna-skryl Nov 7, 2025
6763a2a
refactor(plugin-axe): update to v0.85.0 and centralized test configs
hanna-skryl Nov 7, 2025
6d66b16
refactor(plugin-axe): remove integration test config
hanna-skryl Nov 8, 2025
1e7d304
fix(models,utils,plugin-axe): improve type handling
hanna-skryl Nov 10, 2025
f1c0b61
test(plugin-axe): use jest-extended
hanna-skryl Nov 10, 2025
71f2595
test(models): increase pluginUrlsSchema coverage
hanna-skryl Nov 10, 2025
0a8038f
docs(plugin-axe): link sections
hanna-skryl Nov 10, 2025
b48dac9
refactor(plugin-axe,plugin-eslint,utils): streamline formatting and t…
hanna-skryl Nov 11, 2025
4e9f7fd
test(plugin-axe): correct E2E project key
hanna-skryl Nov 11, 2025
319ebc3
Merge branch 'main' into axe-plugin/core-functionality
hanna-skryl Nov 11, 2025
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
4 changes: 4 additions & 0 deletions code-pushup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dotenv/config';
import {
axeCoreConfig,
coverageCoreConfigNx,
eslintCoreConfigNx,
jsDocsCoreConfig,
Expand Down Expand Up @@ -43,4 +44,7 @@ export default mergeConfigs(
'!**/implementation/**',
'!**/internal/**',
]),
axeCoreConfig(
'https://github.com/code-pushup/cli?tab=readme-ov-file#code-pushup-cli/',
),
);
9 changes: 7 additions & 2 deletions code-pushup.preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import type {
CategoryConfig,
CoreConfig,
PluginUrls,
} from './packages/models/src/index.js';
import axePlugin from './packages/plugin-axe/src/index.js';
import coveragePlugin, {
getNxCoveragePaths,
} from './packages/plugin-coverage/src/index.js';
Expand All @@ -20,7 +22,6 @@ import {
} from './packages/plugin-jsdocs/src/lib/constants.js';
import { filterGroupsByOnlyAudits } from './packages/plugin-jsdocs/src/lib/utils.js';
import lighthousePlugin, {
type LighthouseUrls,
lighthouseGroupRef,
mergeLighthouseCategories,
} from './packages/plugin-lighthouse/src/index.js';
Expand Down Expand Up @@ -137,7 +138,7 @@ export const jsPackagesCoreConfig = async (): Promise<CoreConfig> => ({
});

export const lighthouseCoreConfig = async (
urls: LighthouseUrls,
urls: PluginUrls,
): Promise<CoreConfig> => {
const lhPlugin = await lighthousePlugin(urls);
return {
Expand Down Expand Up @@ -216,3 +217,7 @@ export const coverageCoreConfigNx = async (
categories: coverageCategories,
};
};

export const axeCoreConfig = (urls: PluginUrls): CoreConfig => ({
plugins: [axePlugin(urls)],
});
12 changes: 12 additions & 0 deletions e2e/plugin-axe-e2e/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import tseslint from 'typescript-eslint';
import baseConfig from '../../eslint.config.js';

export default tseslint.config(...baseConfig, {
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { join } from 'node:path';
import { pathToFileURL } from 'node:url';
import axePlugin from '@code-pushup/axe-plugin';
import type { CoreConfig } from '@code-pushup/models';

const htmlFile = join(process.cwd(), 'index.html');
const url = pathToFileURL(htmlFile).href;

export default {
plugins: [axePlugin(url)],
} satisfies CoreConfig;
44 changes: 44 additions & 0 deletions e2e/plugin-axe-e2e/mocks/fixtures/default-setup/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Accessibility Test Page</title>
<style>
/* Poor color contrast for testing */
.low-contrast {
color: #777;
background-color: #999;
padding: 10px;
}
</style>
</head>
<body>
<h1>Accessibility Test Page</h1>

<!-- Missing alt text on image -->
<img src="test-image.jpg" width="200" height="150" />

<!-- Poor color contrast -->
<div class="low-contrast">
This text has poor color contrast and may be hard to read.
</div>

<!-- Invalid ARIA attribute -->
<div role="button" aria-invalid-attribute="true">
Button with invalid ARIA attribute
</div>

<!-- Form input missing label -->
<form>
<input type="text" name="username" placeholder="Enter username" />
<button type="submit">Submit</button>
</form>

<!-- Button without accessible name -->
<button></button>

<!-- Link without accessible name -->
<a href="#"></a>
</body>
</html>
17 changes: 17 additions & 0 deletions e2e/plugin-axe-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "plugin-axe-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/plugin-axe-e2e/src",
"projectType": "application",
"targets": {
"lint": {},
"e2e": {
"executor": "@nx/vite:test",
"options": {
"configFile": "{projectRoot}/vitest.e2e.config.ts"
}
}
},
"implicitDependencies": ["cli", "plugin-axe"],
"tags": ["scope:plugin", "type:e2e"]
}
Loading
Loading