4.4.21 • Published 3 months ago

@hint/hint-axe v4.4.21

Weekly downloads
4,556
License
Apache-2.0
Repository
github
Last release
3 months ago

axe accessibility check (axe)

axe is the accessibility engine for automated testing of HTML-based user interfaces. These hints run the recommended set of WCAG 2.1 Level A and Level AA rules from axe-core.

Why is this important?

The Web is an increasingly important resource in many aspects of life: education, employment, government, commerce, health care, recreation, and more. It is essential that the Web be accessible in order to provide equal access and equal opportunity to people with disabilities. An accessible Web can also help people with disabilities more actively participate in society.

The Web offers the possibility of unprecedented access to information and interaction for many people with disabilities. That is, the accessibility barriers to print, audio, and visual media can be much more easily overcome through Web technologies.

The document "Social Factors in Developing a Web Accessibility Business Case for Your Organization" discusses how the Web impacts the lives of people with disabilities, the overlap with digital divide issues, and Web accessibility as an aspect of corporate social responsibility.

Another important consideration for organizations is that web accessibility is required by laws and policies in some cases.

From WAI’s Introduction to Web Accessibility.

What does the hint check?

By default, hint-axe contains hints which run all the WCAG 2.1 Level A and Level AA rules included in axe-core with document as the target. These rules are grouped into hints based on their assigned category within axe-core. See each contained hint for the specific list of enabled rules within that group and more information about each rule.

Hints

Can the hint be configured?

This hint uses axe.run and the default values (WCAG 2.1 Level A and Level AA rules) over the document. You can modify what rules or categories are executed via an options object that follows axe’s documentation.

Some examples of hint configurations that you can have in the .hintrc file:

Disable a rule included in the default configuration:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "axe/language": ["error", {
            "html-has-lang": "off"
        }],
        ...
    },
    ...
}

Enable a rule excluded from the default configuration:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "axe/keyboard": ["error", [
            "tabindex"
        ]],
        ...
    },
    ...
}

or if you want to set a custom severity:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "axe/keyboard": ["error", {
            "tabindex": "error"
        }],
        ...
    },
    ...
}

Change the severity of an individual rule:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "axe/color": ["error", {
            "color-contrast": "warning"
        }],
        ...
    },
    ...
}

How to use this hint?

This package is installed automatically by webhint:

npm install hint --save-dev

To use it, activate it via the .hintrc configuration file:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "axe/aria": "error",
        "axe/color": "error",
        ...
    },
    "parsers": [...],
    ...
}

Note: The recommended way of running webhint is as a devDependency of your project.

Further Reading

4.4.21

3 months ago

4.4.20

1 year ago

4.4.19

1 year ago

4.4.18

2 years ago

4.4.17

2 years ago

4.4.16

2 years ago

4.4.14

2 years ago

4.4.13

2 years ago

4.4.15

2 years ago

4.4.12

2 years ago

4.4.11

3 years ago

4.4.10

3 years ago

4.4.9

3 years ago

4.4.8

3 years ago

4.4.7

3 years ago

4.4.6

3 years ago

4.4.5

3 years ago

4.4.4

3 years ago

4.4.3

4 years ago

4.4.2

4 years ago

4.4.1

4 years ago

4.4.0

4 years ago

4.3.6

4 years ago

4.3.5

4 years ago

4.3.4

5 years ago

4.3.3

5 years ago

4.3.2

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.0

5 years ago

4.1.6

5 years ago

4.1.5

5 years ago

4.1.4

5 years ago

4.1.3

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.2

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-beta.0

6 years ago