Skip to content

Commit

Permalink
feat(acot-preset-wcag): add invalid-id-reference rule
Browse files Browse the repository at this point in the history
  • Loading branch information
wadackel committed Jun 1, 2022
1 parent 22353a3 commit 2a70d7e
Show file tree
Hide file tree
Showing 5 changed files with 501 additions and 28 deletions.
57 changes: 29 additions & 28 deletions packages/acot-preset-wcag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ You can also enable all the recommended rules for our preset. Add `preset:@acot/

<!-- acot-rules:start -->

| Name | Summary | :heavy_check_mark: |
| :-------------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :----------------- |
| [`@acot/wcag/dialog-focus`](./docs/rules/dialog-focus.md) | Move focus to inside dialog or set dialog after trigger. | :heavy_check_mark: |
| [`@acot/wcag/focusable-has-indicator`](./docs/rules/focusable-has-indicator.md) | Focusable element has a focus indicator. | :heavy_check_mark: |
| [`@acot/wcag/img-has-name`](./docs/rules/img-has-name.md) | The `img` element or img role MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/interactive-has-enough-size`](./docs/rules/interactive-has-enough-size.md) | The size of the target for pointer inputs is at least 44 by 44 CSS pixels. | :heavy_check_mark: |
| [`@acot/wcag/interactive-has-name`](./docs/rules/interactive-has-name.md) | Interactive elements MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/interactive-supports-focus`](./docs/rules/interactive-supports-focus.md) | _T.B.A_ | |
| [`@acot/wcag/link-has-name`](./docs/rules/link-has-name.md) | Link MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/page-has-title`](./docs/rules/page-has-title.md) | Web pages have titles that describe topic or purpose. WCAG 2.1 - 2.4.2. | :heavy_check_mark: |
| [`@acot/wcag/page-has-valid-lang`](./docs/rules/page-has-valid-lang.md) | The `html` element MUST has a valid lang attribute. | :heavy_check_mark: |
| Name | Summary | :heavy_check_mark: |
| :-------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :----------------- |
| [`@acot/wcag/dialog-focus`](./docs/rules/dialog-focus.md) | Move focus to inside dialog or set dialog after trigger. | :heavy_check_mark: |
| [`@acot/wcag/focusable-has-indicator`](./docs/rules/focusable-has-indicator.md) | Focusable element has a focus indicator. | :heavy_check_mark: |
| [`@acot/wcag/img-has-name`](./docs/rules/img-has-name.md) | The `img` element or img role MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/interactive-has-enough-size`](./docs/rules/interactive-has-enough-size.md) | The size of the target for pointer inputs is at least 44 by 44 CSS pixels. | :heavy_check_mark: |
| [`@acot/wcag/interactive-has-name`](./docs/rules/interactive-has-name.md) | Interactive elements MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/interactive-supports-focus`](./docs/rules/interactive-supports-focus.md) | _T.B.A_ | |
| [`@acot/wcag/invalid-id-reference`](./docs/rules/invalid-id-reference.md) | The target of the ID reference or ID reference list MUST exist in the same document. | :heavy_check_mark: |
| [`@acot/wcag/link-has-name`](./docs/rules/link-has-name.md) | Link MUST has name. | :heavy_check_mark: |
| [`@acot/wcag/page-has-title`](./docs/rules/page-has-title.md) | Web pages have titles that describe topic or purpose. WCAG 2.1 - 2.4.2. | :heavy_check_mark: |
| [`@acot/wcag/page-has-valid-lang`](./docs/rules/page-has-valid-lang.md) | The `html` element MUST has a valid lang attribute. | :heavy_check_mark: |

<!-- acot-rules:end -->

Expand All @@ -55,9 +56,9 @@ You can also enable all the recommended rules for our preset. Add `preset:@acot/

#### 1.1 Text Alternatives

| Success criteria | acot rules |
| ---------------------- | ------------------------------------------------------- |
| 1.1.1 Non-text Content | [@acot/wcag/img-has-name](./docs/rules/img-has-name.md) |
| Success criteria | acot rules |
| ---------------------- | ---------- |
| 1.1.1 Non-text Content | - |

#### 1.2 Time-based Media

Expand All @@ -75,14 +76,14 @@ You can also enable all the recommended rules for our preset. Add `preset:@acot/

#### 1.3 Adaptable

| Success criteria | acot rules |
| ----------------------------- | ---------- |
| 1.3.1 Info and Relationships | - |
| 1.3.2 Meaningful Sequence | - |
| 1.3.3 Sensory Characteristics | - |
| 1.3.4 Orientation | - |
| 1.3.5 Identify Input Purpose | - |
| 1.3.6 Identify Purpose | - |
| Success criteria | acot rules |
| ----------------------------- | ----------------------------------------------------------------------- |
| 1.3.1 Info and Relationships | [@acot/wcag/invalid-id-reference](./docs/rules/invalid-id-reference.md) |
| 1.3.2 Meaningful Sequence | - |
| 1.3.3 Sensory Characteristics | - |
| 1.3.4 Orientation | - |
| 1.3.5 Identify Input Purpose | - |
| 1.3.6 Identify Purpose | - |

#### 1.4 Distinguishable

Expand Down Expand Up @@ -139,7 +140,7 @@ You can also enable all the recommended rules for our preset. Add `preset:@acot/
| 2.4.1 Bypass Blocks | - |
| 2.4.2 Page Titled | [@acot/wcag/page-has-title](./docs/rules/page-has-title.md) |
| 2.4.3 Focus Order | [@acot/wcag/dialog-focus](./docs/rules/dialog-focus.md) |
| 2.4.4 Link Purpose (In Context) | [@acot/wcag/link-has-name](./docs/rules/link-has-name.md)- |
| 2.4.4 Link Purpose (In Context) | [@acot/wcag/link-has-name](./docs/rules/link-has-name.md) |
| 2.4.5 Multiple Ways | - |
| 2.4.6 Headings and Labels | - |
| 2.4.7 Focus Visible | [@acot/wcag/focusable-has-indicator](./docs/rules/focusable-has-indicator.md) |
Expand Down Expand Up @@ -196,11 +197,11 @@ You can also enable all the recommended rules for our preset. Add `preset:@acot/

#### 4.1 Compatible

| Success criteria | acot rules |
| ----------------------- | --------------------------------------------------------- |
| 4.1.1 Parsing | - |
| 4.1.2 Name, Role, Value | [@acot/wcag/link-has-name](./docs/rules/link-has-name.md) |
| 4.1.3 Status Messages | - |
| Success criteria | acot rules |
| ----------------------- | ----------------------------------------------------------------------- |
| 4.1.1 Parsing | [@acot/wcag/invalid-id-reference](./docs/rules/invalid-id-reference.md) |
| 4.1.2 Name, Role, Value | [@acot/wcag/link-has-name](./docs/rules/link-has-name.md) |
| 4.1.3 Status Messages | - |

## Concept

Expand Down
Loading

0 comments on commit 2a70d7e

Please sign in to comment.