Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
29 changes: 15 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,30 @@ general:
defaults: &defaults
docker:
- image: circleci/node:10-browsers
working_directory: ~/act-rules.github.io

restore_dependency_cache: &restore_dependency_cache
restore_cache:
keys:
- v3-npm-cache-{{ checksum "package.json" }}
- v3-npm-cache-
- v6-npm-cache-{{ checksum "package.json" }}
- v6-npm-cache-

jobs:
# A dummy placeholder job to not fail circleci status for other branches than `master`
base:
<<: *defaults
steps:
- run: echo "circleci job to not fail status checks"
# get deps
dependencies:
<<: *defaults
steps:
- checkout
- run: npm install
- save_cache:
key: v3-npm-cache-{{ checksum "package.json" }}
key: v6-npm-cache-{{ checksum "package.json" }}
paths:
- node_modules
test:
<<: *defaults
steps:
- checkout
- <<: *restore_dependency_cache
- run: npm test
deploy:
<<: *defaults
steps:
Expand All @@ -45,14 +46,14 @@ workflows:
version: 2
build_and_deploy:
jobs:
- base
- dependencies:
filters:
branches:
only: develop
- dependencies
- test:
requires:
- dependencies
- deploy:
requires:
- dependencies
- test
filters:
branches:
only: develop
2 changes: 1 addition & 1 deletion _rules/autocomplete-valid-73f2c2.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,5 @@ Non-widget element that does not participate in sequential focus navigation.
Non-widget element that does not participate in sequential focus navigation.

```html
<input type="button" role="none" tabindex="-2" autocomplete="username">
<input type="button" role="none" tabindex="-2" autocomplete="username" />
```
2 changes: 1 addition & 1 deletion _rules/button-has-name-97a4e1.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Off screen element without an accessible name.
Button has an accessible name that is not only whitespace.

```html
<button> </button>
<button></button>
```

### Inapplicable
Expand Down
8 changes: 4 additions & 4 deletions _rules/form-field-has-name-e086e5.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ The accessible name is not only whitespace.

```html
<label>
:-)
<input/>
:-)
<input />
</label>
```

Expand Down Expand Up @@ -167,10 +167,10 @@ The explicit label is not supported on `div` elements.
The accessible name is not only whitespace.

```html
<label> <input/></label>
<label> <input /></label>
```

### Inapplicable
### Inapplicable

#### Inapplicable Example 1

Expand Down
6 changes: 3 additions & 3 deletions _rules/html-has-lang-b5c3f8.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,23 @@ The `xml:lang` attribute specifies a value that is not empty (""). The rule does
The `xml:lang` attribute specifies a value that is not empty (""). The rule does not verify the validity of the value specified and checks only for presence of a value.

```html
<html xml:lang="123">
<html xml:lang="123"></html>
```

#### Passed example 9

The `xml:lang` attribute specifies a value that is not empty (""). The rule does not verify the validity of the value specified and checks only for presence of a value.

```html
<html xml:lang="#!">
<html xml:lang="#!"></html>
```

#### Passed example 9

The `xml:lang` attribute specifies a value that is not empty (""). The rule does not verify the validity of the value specified and checks only for presence of a value.

```html
<html xml:lang=" ">
<html xml:lang=" "></html>
```

### Failed
Expand Down
18 changes: 9 additions & 9 deletions _rules/html-lang-valid-bf051a.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ While HTML5 specification indicates that `xml:lang` attribute takes priority ove

## Test Cases

## Passed
### Passed

#### Passed Example 1

Expand Down Expand Up @@ -87,7 +87,7 @@ The `xml:lang` attribute specified has a non-empty value & a valid primary langu
<html lang="" xml:lang="nl"></html>
```

## Failed
### Failed

#### Failed Example 1

Expand Down Expand Up @@ -121,31 +121,31 @@ The `lang` attribute value has a valid primary language subtag, but a syntactica
<html lang="en-US-GB"></html>
```

#### Failed example 1
#### Failed Example 5

The `lang` attribute value is not a valid primary language subtag.

```html
<html lang="123">
<html lang="123"></html>
```

#### Failed example 1
#### Failed Example 6

The `lang` attribute value is not a valid primary language subtag.

```html
<html lang="#!">
<html lang="#!"></html>
```

#### Failed example 1
#### Failed Example 7

The `lang` attribute value is not a valid primary language subtag.

```html
<html lang=" ">
<html lang=" "></html>
```

## Inapplicable
### Inapplicable

#### Inapplicable Example 1

Expand Down
6 changes: 2 additions & 4 deletions _rules/iframe-has-name-cae760.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ Usage of `aria-labelledby` attribute to describe the `iframe` content.
Accessible name is not only whitespace.

```html
<iframe title=":-)" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
<iframe title=":-)" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>
```

### Failed
Expand Down Expand Up @@ -153,8 +152,7 @@ Usage of `alt` attribute to describe content is not valid.
Accessible name is not only whitespace.

```html
<iframe title=" " src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
<iframe title=" " src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>
```

### Inapplicable
Expand Down
2 changes: 1 addition & 1 deletion _rules/image-has-name-23a2a8.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The `img` element inside a `div` positioned off screen has no accessible name an
The HTML `img` element has an accessible name that only consist of whitespace

```html
<img aria-label=" "/>
<img aria-label=" " />
```

### Inapplicable
Expand Down
26 changes: 13 additions & 13 deletions _rules/lang-valid-de46e4.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The `lang` and `xml:lang` attributes of the test target have a [valid language s

This rule assumes that the presence of a lang or xml:lang attribute is being used to comply to WCAG. This rule doesn't test if the attribute is needed to comply to WCAG.

## Accessibility support
## Accessibility Support

_There are no major accessibility support issues known for this rule._

Expand Down Expand Up @@ -98,9 +98,9 @@ The `lang` and `xml:lang` attribute values are either empty ("") or have a valid

```html
<html>
<body>
<p lang="en" xml:lang="">Good Morning.</p>
</body>
<body>
<p lang="en" xml:lang="">Good Morning.</p>
</body>
</html>
```

Expand Down Expand Up @@ -148,9 +148,9 @@ The `lang` attribute value is not empty ("") and is not a valid primary language

```html
<html>
<body>
<article lang=" "></article>
</body>
<body>
<article lang=" "></article>
</body>
</html>
```

Expand All @@ -160,9 +160,9 @@ The `lang` attribute value is not empty ("") and is not a valid primary language

```html
<html>
<body>
<article lang="#!"></article>
</body>
<body>
<article lang="#!"></article>
</body>
</html>
```

Expand All @@ -172,9 +172,9 @@ The `lang` attribute value is not empty ("") and is not a valid primary language

```html
<html>
<body>
<article lang="123"></article>
</body>
<body>
<article lang="123"></article>
</body>
</html>
```

Expand Down
46 changes: 29 additions & 17 deletions _rules/link-has-name-c487ae.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,18 @@ When `link` is off screen.

```html
<html>
<style>
.offScreenLink {
position: absolute;
left: -9999px;
top: -9999px;
}
</style>
<body>
<a class="offScreenLink" href="http://www.w3.org/WAI">Web Accessibility Initiative (WAI)</a>
</body>
<style>
.offScreenLink {
position: absolute;
left: -9999px;
top: -9999px;
}
</style>
<body>
<a class="offScreenLink" href="http://www.w3.org/WAI"
>Web Accessibility Initiative (WAI)</a
>
</body>
</html>
```

Expand All @@ -144,11 +146,16 @@ When `link` is off screen.
`area` element with `href` attribute has accessible name.

```html
<img src="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">
<img
src="planets.gif"
width="145"
height="126"
alt="Planets"
usemap="#planetmap"
/>

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
</map>
```

Expand Down Expand Up @@ -234,11 +241,16 @@ Link is completely empty, but still shows up in focus order, so it should have a
`area` element with `href` attribute does not have accessible name.

```html
<img src="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">
<img
src="planets.gif"
width="145"
height="126"
alt="Planets"
usemap="#planetmap"
/>

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm">
<area shape="rect" coords="0,0,82,126" href="sun.htm" />
</map>
```

Expand Down Expand Up @@ -293,5 +305,5 @@ Not included in the accessibility tree due to `aria-hidden="true"`.
`area` element without `href` attribute does not have role of `link`.

```html
<area shape="rect" coords="0,0,82,126">
<area shape="rect" coords="0,0,82,126" />
```
Loading