Skip to content

Commit 870343a

Browse files
authored
Merge branch 'main' into feature/1.4.1
2 parents 7dcfaf9 + 3e12e98 commit 870343a

File tree

3 files changed

+49
-194
lines changed

3 files changed

+49
-194
lines changed

.github/workflows/Semgrep.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Name of this GitHub Actions workflow.
2+
name: Semgrep
3+
4+
on:
5+
# Scan changed files in PRs (diff-aware scanning):
6+
pull_request: {}
7+
# Scan on-demand through GitHub Actions interface:
8+
workflow_dispatch: {}
9+
# Scan mainline branches and report all findings:
10+
push:
11+
branches: ["master", "main"]
12+
# Schedule the CI job (this method uses cron syntax):
13+
schedule:
14+
- cron: '20 17 * * *' # Sets Semgrep to scan every day at 17:20 UTC.
15+
# It is recommended to change the schedule to a random time.
16+
17+
jobs:
18+
semgrep:
19+
# User definable name of this GitHub Actions job.
20+
name: semgrep/ci
21+
# If you are self-hosting, change the following `runs-on` value:
22+
runs-on: ubuntu-latest
23+
24+
container:
25+
# A Docker image with Semgrep installed. Do not change this.
26+
image: semgrep/semgrep
27+
28+
# Skip any PR created by dependabot to avoid permission issues:
29+
if: (github.actor != 'dependabot[bot]')
30+
31+
steps:
32+
# Fetch project source with GitHub Actions Checkout. Use either v3 or v4.
33+
- uses: actions/checkout@v4
34+
# Run the "semgrep ci" command on the command line of the docker image.
35+
- run: semgrep ci
36+
env:
37+
# Connect to Semgrep Cloud Platform through your SEMGREP_APP_TOKEN.
38+
# Generate a token from Semgrep Cloud Platform > Settings
39+
# and add it to your GitHub secrets.
40+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CODEOWNERS##############################################################
2+
#
3+
# List of approvers/reviewers for a11y-engine-axe-core
4+
#
5+
##############################################################
6+
7+
* @Jimesh-browserstack @sunny-se

README.md

Lines changed: 2 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
# a11y-engine-axe-core
2-
This is a private fork of public Axe core repo:
2+
This is a fork of public Axe core repo:
33
https://github.com/dequelabs/axe-core
44

55

6-
## How to make changes in axe-core internally
7-
Create a feature branch, add the changes and raise a PR to the `main` branch.
8-
9-
NOTE: `axe-core` public repo already has a master branch, to keep the things clean while merging we avoid make changes on top of it.
10-
11-
12-
## Using the repo as submodule
13-
To use this repo as a submodule, make sure to use `main` branch as the submodule commit head.
14-
15-
This we way can track the changes in a cleaner way.
16-
For development and development testing however we can rely on some other commits in the submodule.
17-
186
## Pull latest changes from public axe-core repo
197

208
```
@@ -31,184 +19,4 @@ git pull public master
3119
git push origin master
3220
```
3321

34-
# axe-core
35-
36-
[![License](https://img.shields.io/npm/l/axe-core.svg)](LICENSE)
37-
[![Version](https://img.shields.io/npm/v/axe-core.svg)](https://www.npmjs.com/package/axe-core)
38-
[![Total npm downloads](https://img.shields.io/npm/dt/axe-core.svg)](https://www.npmjs.com/package/axe-core)
39-
[![Commits](https://img.shields.io/github/commit-activity/y/dequelabs/axe-core.svg)](https://github.com/dequelabs/axe-core/commits/develop)
40-
[![GitHub contributors](https://img.shields.io/github/contributors/dequelabs/axe-core.svg)](https://github.com/dequelabs/axe-core/graphs/contributors)
41-
[![Join our Slack chat](https://img.shields.io/badge/slack-chat-purple.svg?logo=slack)](https://accessibility.deque.com/axe-community)
42-
[![Package Quality](https://npm.packagequality.com/shield/axe-core.svg)](https://packagequality.com/#?package=axe-core)
43-
44-
Axe is an accessibility testing engine for websites and other HTML-based user interfaces. It's fast, secure, lightweight, and was built to seamlessly integrate with any existing test environment so you can automate accessibility testing alongside your regular functional testing.
45-
46-
[Sign up for axe news](https://hubs.ly/H0fsN0b0) to get the latest on axe features, future releases, and events.
47-
48-
## The Accessibility Rules
49-
50-
Axe-core has different types of rules, for WCAG 2.0 and 2.1 on level A and AA, as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an `h1` heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored.
51-
52-
With axe-core, you can find **on average 57% of WCAG issues automatically**. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed.
53-
54-
To catch bugs earlier in the development cycle we recommend using the [axe-linter vscode extension](https://marketplace.visualstudio.com/items?itemName=deque-systems.vscode-axe-linter). To improve test coverage even further we recommend the [intelligent guided tests](https://www.youtube.com/watch?v=AtsX0dPCG_4&feature=youtu.be&ab_channel=DequeSystems) in the [axe Extension](https://www.deque.com/axe/browser-extensions/).
55-
56-
The complete list of rules, grouped WCAG level and best practice, can found in [doc/rule-descriptions.md](./doc/rule-descriptions.md).
57-
58-
## Getting started
59-
60-
First download the package:
61-
62-
```console
63-
npm install axe-core --save-dev
64-
```
65-
66-
Now include the javascript file in each of your iframes in your fixtures or test systems:
67-
68-
```html
69-
<script src="node_modules/axe-core/axe.min.js"></script>
70-
```
71-
72-
Now insert calls at each point in your tests where a new piece of UI becomes visible or exposed:
73-
74-
```js
75-
axe
76-
.run()
77-
.then(results => {
78-
if (results.violations.length) {
79-
throw new Error('Accessibility issues found');
80-
}
81-
})
82-
.catch(err => {
83-
console.error('Something bad happened:', err.message);
84-
});
85-
```
86-
87-
## Philosophy
88-
89-
The web can only become an accessible, inclusive space if developers are empowered to take responsibility for accessibility testing and accessible coding practices.
90-
91-
Automated accessibility testing is a huge timesaver, it doesn't require special expertise, and it allows teams to focus expert resources on the accessibility issues that really need them. Unfortunately, most accessibility tools are meant to be run on sites and applications that have reached the end of the development process and often don't give clear or consistent results, causing frustration and delays just when you thought your product was ready to ship.
92-
93-
Axe was built to reflect how web development actually works. It works with all modern browsers, tools, and testing environments a dev team might use. With axe, accessibility testing can be performed as part of your unit testing, integration testing, browser testing, and any other functional testing your team already performs on a day-to-day basis. Building accessibility testing into the early development process saves time, resources, and all kinds of frustration.
94-
95-
## About axe - our Manifesto
96-
97-
- Axe is open source.
98-
- It returns zero false positives (bugs notwithstanding).
99-
- It's designed to work on all modern browsers and with whatever tools, frameworks, libraries and environments you use today.
100-
- It's actively supported by [Deque Systems](https://www.deque.com), a major accessibility vendor.
101-
- It integrates with your existing functional/acceptance automated tests.
102-
- It automatically determines which rules to run based on the evaluation context.
103-
- Axe supports in-memory fixtures, static fixtures, integration tests and iframes of infinite depth.
104-
- Axe is highly configurable.
105-
106-
## Supported Browsers
107-
108-
The [axe-core API](doc/API.md) fully supports the following browsers:
109-
110-
- Microsoft Edge v40 and above
111-
- Google Chrome v42 and above
112-
- Mozilla Firefox v38 and above
113-
- Apple Safari v7 and above
114-
- Internet Explorer v11
115-
116-
Support means that we will fix bugs and attempt to test each browser regularly. Only Firefox, Chrome, and Internet Explorer 11 are currently tested on every pull request.
117-
118-
There is limited support for JSDOM. We will attempt to make all rules compatible with JSDOM but where this is not possible, we recommend turning those rules off. Currently the `color-contrast` rule is known not to work with JSDOM.
119-
120-
We can only support environments where features are either natively supported or polyfilled correctly. We do not support the deprecated v0 Shadow DOM implementation.
121-
122-
## Contents of the API Package
123-
124-
The [axe-core API](doc/API.md) package consists of:
125-
126-
- `axe.js` - the JavaScript file that should be included in your web site under test (API)
127-
- `axe.min.js` - a minified version of the above file
128-
129-
## Localization
130-
131-
Axe can be built using your local language. To do so, a localization file must be added to the `./locales` directory. This file must have be named in the following manner: `<langcode>.json`. To build axe using this locale, instead of the default, run axe with the `--lang` flag, like so:
132-
133-
`grunt build --lang=nl`
134-
135-
or equivalently:
136-
137-
`npm run build -- --lang=nl`
138-
139-
This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build localized versions, simply pass in `--all-lang` instead. If you want to build multiple localized versions (but not all of them), you can pass in a comma-separated list of langages to the `--lang` flag, like `--lang=nl,ja`.
140-
141-
To create a new translation for axe, start by running `grunt translate --lang=<langcode>`. This will create a json file fin the `./locales` directory, with the default English text in it for you to translate. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below. For details on the message syntax, see [Check Message Template](/docs/check-message-template.md).
142-
143-
To update existing translation file, re-run `grunt translate --lang=<langcode>`. This will add new messages used in English and remove messages which were not used in English.
144-
145-
Additionally, locale can be applied at runtime by passing a `locale` object to `axe.configure()`. The locale object must be of the same shape as existing locales in the `./locales` directory. For example:
146-
147-
```js
148-
axe.configure({
149-
locale: {
150-
lang: 'de',
151-
rules: {
152-
accesskeys: {
153-
help: 'Der Wert des accesskey-Attributes muss einzigartig sein.'
154-
}
155-
// ...
156-
},
157-
checks: {
158-
abstractrole: {
159-
fail: 'Abstrakte ARIA-Rollen dürfen nicht direkt verwendet werden.'
160-
},
161-
'aria-errormessage': {
162-
// Note: doT (https://github.com/olado/dot) templates are supported here.
163-
fail:
164-
'Der Wert der aria-errormessage ${data.values}` muss eine Technik verwenden, um die Message anzukündigen (z. B., aria-live, aria-describedby, role=alert, etc.).'
165-
}
166-
// ...
167-
}
168-
}
169-
});
170-
```
171-
172-
### Supported Locales
173-
174-
Axe-core supports the following locales. Do note that since locales are contributed by our community, they are not guaranteed to include all translations needed in a release.
175-
176-
- Basque
177-
- Danish
178-
- Dutch
179-
- French
180-
- German
181-
- Japanese
182-
- Korean
183-
- Polish
184-
- Portuguese (Brazilian)
185-
- Spanish
186-
187-
## Updates & Security
188-
189-
Axe-core has a new minor release every 3 to 5 months, which usually introduces new rules and features. We recommend scheduling time to upgrade to these versions. Security updates will be made available for minor version lines up to **18 months old**.
190-
191-
- See [release and support](doc/release-and-support.md) for details on the frequency of releases, long-term support and recommendations on upgrading axe-core.
192-
- See [backward compatibility](doc/backwards-compatibility-doc.md) for details on the types of changes different releases may introduce.
193-
194-
## Supported ARIA Roles and Attributes.
195-
196-
Refer [axe-core ARIA support](./doc/aria-supported.md) for a complete list of ARIA supported roles and attributes by axe.
197-
198-
## Contributing
199-
200-
Read the [Proposing Axe-core Rules guide](./doc/rule-proposal.md)
201-
202-
Read the [documentation on the architecture](./doc/developer-guide.md)
203-
204-
Read the [documentation on contributing](CONTRIBUTING.md)
205-
206-
## Projects using axe-core
207-
208-
[List of projects using axe-core](doc/projects.md)
209-
210-
## Acknowledgements
211-
212-
Thanks to Dulin Marat for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support.
213-
214-
Thanks to the [Slick Parser](https://github.com/mootools/slick/blob/master/Source/Slick.Parser.js) implementers for their contribution, we have used some of their algorithms in our shadow DOM support code.
22+
Axe-core readme: https://github.com/dequelabs/axe-core/blob/v4.4.2/README.md

0 commit comments

Comments
 (0)