Skip to content

Commit

Permalink
feat(link-in-text-block): Enable rule by default (#3706)
Browse files Browse the repository at this point in the history
* feat(link-in-text-block): Enable rule by default

* update rule-descriptions

* Fix integration test

* Skip APG issue
  • Loading branch information
WilcoFiers committed Oct 10, 2022
1 parent 2935950 commit 37b6e7a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
| [input-button-name](https://dequeuniversity.com/rules/axe/4.4/input-button-name?application=RuleDescription) | Ensures input buttons have discernible text | Critical | cat.name-role-value, wcag2a, wcag412, section508, section508.22.a, ACT | failure, needs review | [97a4e1](https://act-rules.github.io/rules/97a4e1) |
| [input-image-alt](https://dequeuniversity.com/rules/axe/4.4/input-image-alt?application=RuleDescription) | Ensures <input type="image"> elements have alternate text | Critical | cat.text-alternatives, wcag2a, wcag111, wcag412, section508, section508.22.a, ACT | failure, needs review | [59796f](https://act-rules.github.io/rules/59796f) |
| [label](https://dequeuniversity.com/rules/axe/4.4/label?application=RuleDescription) | Ensures every form element has a label | Minor, Critical | cat.forms, wcag2a, wcag412, section508, section508.22.n, ACT | failure, needs review | [e086e5](https://act-rules.github.io/rules/e086e5) |
| [link-in-text-block](https://dequeuniversity.com/rules/axe/4.4/link-in-text-block?application=RuleDescription) | Ensure links are distinguished from surrounding text in a way that does not rely on color | Serious | cat.color, wcag2a, wcag141 | failure, needs review | |
| [link-name](https://dequeuniversity.com/rules/axe/4.4/link-name?application=RuleDescription) | Ensures links have discernible text | Serious | cat.name-role-value, wcag2a, wcag412, wcag244, section508, section508.22.a, ACT | failure, needs review | [c487ae](https://act-rules.github.io/rules/c487ae) |
| [list](https://dequeuniversity.com/rules/axe/4.4/list?application=RuleDescription) | Ensures that lists are structured correctly | Serious | cat.structure, wcag2a, wcag131 | failure | |
| [listitem](https://dequeuniversity.com/rules/axe/4.4/listitem?application=RuleDescription) | Ensures <li> elements are used semantically | Serious | cat.structure, wcag2a, wcag131 | failure | |
Expand Down Expand Up @@ -142,7 +143,6 @@ Rules we are still testing and developing. They are disabled by default in axe-c
| [focus-order-semantics](https://dequeuniversity.com/rules/axe/4.4/focus-order-semantics?application=RuleDescription) | Ensures elements in the focus order have a role appropriate for interactive content | Minor | cat.keyboard, best-practice, experimental | failure | |
| [hidden-content](https://dequeuniversity.com/rules/axe/4.4/hidden-content?application=RuleDescription) | Informs users about hidden content. | Minor | cat.structure, experimental, review-item, best-practice | failure, needs review | |
| [label-content-name-mismatch](https://dequeuniversity.com/rules/axe/4.4/label-content-name-mismatch?application=RuleDescription) | Ensures that elements labelled through their content must have their visible text as part of their accessible name | Serious | cat.semantics, wcag21a, wcag253, experimental | failure | [2ee8b8](https://act-rules.github.io/rules/2ee8b8) |
| [link-in-text-block](https://dequeuniversity.com/rules/axe/4.4/link-in-text-block?application=RuleDescription) | Ensure links are distinguished from surrounding text in a way that does not rely on color | Serious | cat.color, experimental, wcag2a, wcag141 | failure, needs review | |
| [p-as-heading](https://dequeuniversity.com/rules/axe/4.4/p-as-heading?application=RuleDescription) | Ensure bold, italic text and font-size is not used to style <p> elements as a heading | Serious | cat.semantics, wcag2a, wcag131, experimental | failure, needs review | |
| [table-fake-caption](https://dequeuniversity.com/rules/axe/4.4/table-fake-caption?application=RuleDescription) | Ensure that tables with a caption use the <caption> element. | Serious | cat.tables, experimental, wcag2a, wcag131, section508, section508.22.g | failure | |
| [td-has-header](https://dequeuniversity.com/rules/axe/4.4/td-has-header?application=RuleDescription) | Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers | Critical | cat.tables, experimental, wcag2a, wcag131, section508, section508.22.g | failure | |
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/link-in-text-block.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"selector": "a[href], [role=link]",
"matches": "link-in-text-block-matches",
"excludeHidden": false,
"tags": ["cat.color", "experimental", "wcag2a", "wcag141"],
"tags": ["cat.color", "wcag2a", "wcag141"],
"metadata": {
"description": "Ensure links are distinguished from surrounding text in a way that does not rely on color",
"help": "Links must be distinguishable without relying on color"
Expand Down
4 changes: 3 additions & 1 deletion test/aria-practices/apg.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ describe('aria-practices', function () {
'button/button_idl.html': ['aria-allowed-attr'],
// https://github.com/w3c/aria-practices/issues/2285
'checkbox/checkbox.html': ['empty-table-header'],
'dialog-modal/datepicker-dialog.html': ['empty-table-header']
'dialog-modal/datepicker-dialog.html': ['empty-table-header'],
// https://github.com/w3c/aria-practices/issues/2505
'landmarks/search.html': ['link-in-text-block']
};

// Not an actual content file
Expand Down
1 change: 1 addition & 0 deletions test/integration/full/isolated-env/isolated-env.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ <h2>Ok</h2>
src="frames/focusable.html"
tabindex="-1"
></iframe>
<p>Paragraph with a <a href="#">link</a>.</p>
</div>
<div id="mocha"></div>
<script src="/test/testutils.js"></script>
Expand Down

0 comments on commit 37b6e7a

Please sign in to comment.