Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename aria-input-field-label and aria-toggle-field-label #1656

Merged
merged 1 commit into from
Jul 2, 2019
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
4 changes: 2 additions & 2 deletions doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
| aria-dpub-role-fallback | Ensures unsupported DPUB roles are only used on elements with implicit fallback roles | Moderate | cat.aria, wcag2a, wcag131 | true |
| aria-hidden-body | Ensures aria-hidden='true' is not present on the document body. | Critical | cat.aria, wcag2a, wcag412 | true |
| aria-hidden-focus | Ensures aria-hidden elements do not contain focusable elements | Serious | cat.name-role-value, wcag2a, wcag412, wcag131 | true |
| aria-input-field-label | Ensures every ARIA input field has an accessible name | Moderate, Serious | wcag2a, wcag412 | true |
| aria-input-field-name | Ensures every ARIA input field has an accessible name | Moderate, Serious | wcag2a, wcag412 | true |
| aria-required-attr | Ensures elements with ARIA roles have all required ARIA attributes | Critical | cat.aria, wcag2a, wcag412 | true |
| aria-required-children | Ensures elements with an ARIA role that require child roles contain them | Critical | cat.aria, wcag2a, wcag131 | true |
| aria-required-parent | Ensures elements with an ARIA role that require parent roles are contained by them | Critical | cat.aria, wcag2a, wcag131 | true |
| aria-roles | Ensures all elements with a role attribute use a valid value | Serious, Critical | cat.aria, wcag2a, wcag412 | true |
| aria-toggle-field-label | Ensures every ARIA toggle field has an accessible name | Moderate, Serious | wcag2a, wcag412 | true |
| aria-toggle-field-name | Ensures every ARIA toggle field has an accessible name | Moderate, Serious | wcag2a, wcag412 | true |
| aria-valid-attr-value | Ensures all ARIA attributes have valid values | Critical | cat.aria, wcag2a, wcag412 | true |
| aria-valid-attr | Ensures attributes that begin with aria- are valid ARIA attributes | Critical | cat.aria, wcag2a, wcag412 | true |
| audio-caption | Ensures <audio> elements have captions | Critical | cat.time-and-media, wcag2a, wcag121, section508, section508.22.a | false |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-input-field-label",
"id": "aria-input-field-name",
"selector": "[role=\"combobox\"], [role=\"listbox\"], [role=\"searchbox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"]",
"matches": "aria-form-field-label-matches.js",
"matches": "aria-form-field-name-matches.js",
"tags": ["wcag2a", "wcag412"],
"metadata": {
"description": "Ensures every ARIA input field has an accessible name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-toggle-field-label",
"id": "aria-toggle-field-name",
"selector": "[role=\"checkbox\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"radio\"], [role=\"switch\"]",
"matches": "aria-form-field-label-matches.js",
"matches": "aria-form-field-name-matches.js",
"tags": ["wcag2a", "wcag412"],
"metadata": {
"description": "Ensures every ARIA toggle field has an accessible name",
Expand Down
4 changes: 2 additions & 2 deletions locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"description": "aria-hidden要素にフォーカス可能な要素が含まれていないことを確認します",
"help": "ARIA hidden要素にフォーカス可能な要素を含んではなりません"
},
"aria-input-field-label": {
"aria-input-field-name": {
"description": "すべてのARIA入力欄にアクセシブルな名前があることを確認します",
"help": "ARIA入力欄にアクセシブルな名前があります"
},
Expand All @@ -49,7 +49,7 @@
"description": "すべてのロール属性が指定された要素で、有効な値が使用されていることを確認します",
"help": "使用されているARIAロールは有効な値に一致しなければなりません"
},
"aria-toggle-field-label": {
"aria-toggle-field-name": {
"description": "すべてのARIAトグル欄にアクセシブルな名前があることを確認します",
"help": "ARIAトグル欄にアクセシブルな名前があります"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "aria-input-field-label test",
"rule": "aria-input-field-label",
"description": "aria-input-field-name test",
"rule": "aria-input-field-name",
"passes": [
["#pass1"],
["#pass2"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "aria-toggle-field-label test",
"rule": "aria-toggle-field-label",
"description": "aria-toggle-field-name test",
"rule": "aria-toggle-field-name",
"passes": [["#pass1"], ["#pass2"], ["#pass3"], ["#pass4"], ["#pass5"]],
"violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"], ["#fail5"]],
"incomplete": [["#canttell1"], ["#canttell2"]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
describe('aria-form-field-label-matches', function() {
describe('aria-form-field-name-matches', function() {
'use strict';

var fixture = document.getElementById('fixture');
var queryFixture = axe.testUtils.queryFixture;
var rule = axe._audit.rules.find(function(rule) {
return (
rule.id === 'aria-toggle-field-label' ||
rule.id === 'aria-input-field-label'
rule.id === 'aria-toggle-field-name' ||
rule.id === 'aria-input-field-name'
);
});

Expand Down