Skip to content

Commit

Permalink
Add Testing on Basic Auth pages section (#28)
Browse files Browse the repository at this point in the history
to README
  • Loading branch information
ttsukagoshi committed Nov 19, 2022
1 parent 6258a58 commit 43ba87b
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ A CLI tool to test web accessibility on multiple web pages based on a list of UR
- [Create a summarized report](#create-a-summarized-report)
- [Define whitelist](#define-whitelist)
- [Configuring axe-scan](#configuring-axe-scan)
- [Testing on websites with basic authentication](#testing-on-websites-with-basic-authentication)
- [Acknowledgements](#acknowledgements)

## Philosophy and Features
Expand Down Expand Up @@ -157,6 +158,8 @@ https://www.website-to-test.com/subpage/
https://www.website-to-test.com/another-subpage/
```

You may want to see also the [Testing on websites with basic authentication](#testing-on-websites-with-basic-authentication) section.

axe-scan outputs the list of page-by-page, element-by-element test results, where the result type is `violation` or `incomplete`. See [the axe-core documentation](https://www.deque.com/axe/core-documentation/api-documentation/#results-object) for their definitions. Which result type to output in the report can be changed by the editing the configuration file `axe-scan.config.json`:

```jsonc
Expand Down Expand Up @@ -190,7 +193,15 @@ For details of whitelisting, see the [Define whitelist section](#define-whitelis
axe-scan summary [options]
```

Create a summarized accessibility report of the web pages grouped by the WCAG success criteria. If the option `--pages` is set, the report will be generated per page.
Create a summarized accessibility report of the web pages grouped by the WCAG success criteria. If the option `--page` is set, the report will be generated per page.

You may want to see also the [Testing on websites with basic authentication](#testing-on-websites-with-basic-authentication) section.

#### Options

- `-F`, `--file <urlsFilePath>`: Designate the file path for the list of URLs on which to conduct the accessibility test.
- `-P`, `--page`: Create the summary report on per page basis.
- `-W`, `--whitelist <whitelistFilePath>`: Designate the file path for the list of whitelisted accessibility alerts.

### Define whitelist

Expand Down Expand Up @@ -220,6 +231,30 @@ axe-scan summary -W whitelist.csv > summary.csv
| `filePath` | File path to the list of URLs to test accessibility on. For example, if you want axe-scan to refer to the `target-urls.txt` in a subdirectory named `data` in your macOS, you would set this value to `./data/target-urls.txt`. | `./urls.txt` |
| `locale` | The language of the axe output and messages of axe-scan. See [dequelabs/axe-core](https://github.com/dequelabs/axe-core#supported-locales) for the comprehensive list of supported locales in axe. Except for `en` (English; the default value), the language code should match the JSON file names available in the [locales folder of axe-core](https://github.com/dequelabs/axe-core/tree/develop/locales), e.g. `de` (Germany) from `de.json`. Note that messages of axe-scan are separately maintained in [`./src/messages.ts` of this repository](https://github.com/ttsukagoshi/axe-scan/blob/main/src/messages.ts) | `en` |

## Testing on websites with basic authentication

When testing on websites with basic authentication, include the auth info in the list of URLs in the following format:

```
https://userid:[email protected]/
```

For example, if you are testing on the following pages:

```
https://mywebsite.com/
https://mywebsite.com/subpage1/
https://mywebsite.com/subpage2/
```

with basic authentication of ID: `myAccountId` and password: `qwerty`, your `urls.txt` should look like this:

```
https://myAccountId:[email protected]/
https://myAccountId:[email protected]/subpage1/
https://myAccountId:[email protected]/subpage2/
```

## Acknowledgements

Although coded from scratch, this tool itself was greatly inspired by works of [louis-reed/axe-reports](https://github.com/louis-reed/axe-reports) and [caztcha/axe-test](https://github.com/caztcha/axe-test). Both have utilized the results of axe-core to create a CSV or spreadsheet of accessibility issues.

0 comments on commit 43ba87b

Please sign in to comment.