Skip to content

Commit

Permalink
chore(rules): add id symbol in message for duplicate id
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Oct 15, 2023
1 parent e5a5543 commit 56a41f7
Show file tree
Hide file tree
Showing 19 changed files with 299 additions and 269 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ List of [WCAG2.1 techniques](https://www.w3.org/TR/WCAG21/) and whether or not w
| [F40](https://www.w3.org/TR/WCAG20-TECHS/F40.html) | meta redirect used with a time limit | A-AAA | error | 2 ||
| [F41](https://www.w3.org/TR/WCAG20-TECHS/F41.html) | meta refresh used to reload the page | A-AAA | error | 2 ||
| [F47](https://www.w3.org/TR/WCAG20-TECHS/F47.html) | blink element used for attention | A-AAA | error | ||
| [F77](https://www.w3.org/TR/WCAG20-TECHS/F77.html) | duplicate ID found | A-AAA | error | | ✔️ |
| [F77](https://www.w3.org/TR/WCAG20-TECHS/F77.html) | duplicate ID found | A-AAA | error | | |

Errors that can be to be tested with automation `14/70`.
Errors that can be to be tested with automation `16/70`.

Key: ✅ = Complete, ✔️ = Complete with a bit of missing details.
2 changes: 1 addition & 1 deletion accessibility-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "accessibility-rs"
version = "0.0.24"
version = "0.0.26"
authors = ["The A11yWatch Project Developers", "Jeff Mendez <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
66 changes: 33 additions & 33 deletions accessibility-rs/locales/en.json

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions accessibility-rs/locales/es.json

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions accessibility-rs/locales/fr.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions accessibility-rs/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"1_3_1_H44.NotFormControl": "This label's \"for\" attribute contains an ID for an element that is not a form control. Ensure that you have entered the correct ID for the intended element.",
"1_3_1_H65": "This form control has a \"title\" attribute that is empty or contains only spaces. It will be ignored for labelling test purposes.",
"1_3_1_ARIA6": "This form control has an \"aria-label\" attribute that is empty or contains only spaces. It will be ignored for labelling test purposes.",
"1_3_1_ARIA16,ARIA9": "This form control contains an aria-labelledby attribute, however it includes an ID \"{{id}}\" that does not exist on an element. The aria-labelledby attribute will be ignored for labelling test purposes.",
"1_3_1_ARIA16,ARIA9": "This form control contains an aria-labelledby attribute, however it includes an ID \"%{id}\" that does not exist on an element. The aria-labelledby attribute will be ignored for labelling test purposes.",
"1_3_1_F68.Hidden": "This hidden form field is labelled in some way. There should be no need to label a hidden form field.",
"1_3_1_F68.HiddenAttr": "This form field is intended to be hidden (using the \"hidden\" attribute), but is also labelled in some way. There should be no need to label a hidden form field.",
"1_3_1_F68": "This form field should be labelled in some way. Use the label element (either with a \"for\" attribute or wrapped around the form field), or \"title\", \"aria-label\" or \"aria-labelledby\" attributes as appropriate.",
Expand All @@ -45,7 +45,7 @@
"1_3_1_H63.3": "Table cell has an invalid scope attribute. Valid values are row, col, rowgroup, or colgroup.",
"1_3_1_H63.2": "Scope attributes on td elements that act as headings for other elements are obsolete in HTML5. Use a th element instead.",
"1_3_1_H43.ScopeAmbiguous": "Scope attributes on th elements are ambiguous in a table with multiple levels of headings. Use the headers attribute on td elements instead.",
"1_3_1_H43.IncorrectAttr": "Incorrect headers attribute on this td element. Expected \"{{expected}}\" but found \"{{actual}}\"",
"1_3_1_H43.IncorrectAttr": "Incorrect headers attribute on this td element. Expected \"%{expected}\" but found \"%{actual}\"",
"1_3_1_H43.IncorrectAttrNotice": "Check that headers attribute on td element is correct.",
"1_3_1_H43.HeadersRequired": "The relationship between td elements and their associated th elements is not defined. As this table has multiple levels of th elements, you must use the headers attribute on td elements.",
"1_3_1_H43.MissingHeaderIds": "Not all th elements in this table contain an id attribute. These cells should contain ids so that they may be referenced by td elements' headers attributes.",
Expand All @@ -64,8 +64,8 @@
"1_3_1_H71.SameName": "If these radio buttons or check boxes require a further group-level description, they should be contained within a fieldset element.",
"1_3_1_H48.1": "This content looks like it is simulating an unordered list using plain text. If so, marking up this content with a ul element would add proper structure information to the document.",
"1_3_1_H48.2": "This content looks like it is simulating an ordered list using plain text. If so, marking up this content with an ol element would add proper structure information to the document.",
"1_3_1_G141_a": "The heading structure is not logically nested. This h{{headingNum}} element appears to be the primary document heading, so should be an h1 element.",
"1_3_1_G141_b": "The heading structure is not logically nested. This h{{headingNum}} element should be an h{{properHeadingNum}} to be properly nested.",
"1_3_1_G141_a": "The heading structure is not logically nested. This h%{headingNum} element appears to be the primary document heading, so should be an h1 element.",
"1_3_1_G141_b": "The heading structure is not logically nested. This h%{headingNum} element should be an h%{properHeadingNum} to be properly nested.",
"1_3_1_H42.2": "Heading tag found with no content. Text that is not intended as a heading should not be marked up with heading tags.",
"1_3_1_H48": "If this element contains a navigation section, it is recommended that it be marked up as a list.",
"1_3_1_LayoutTable": "This table appears to be a layout table. If it is meant to instead be a data table, ensure header cells are identified using th elements.",
Expand All @@ -76,18 +76,18 @@
"1_4_2_F23": "If this element contains audio that plays automatically for longer than 3 seconds, check that there is the ability to pause, stop or mute the audio.",
"1_4_3_F24.BGColour": "Check that this element has an inherited foreground colour to complement the corresponding inline background colour or image.",
"1_4_3_F24.FGColour": "Check that this element has an inherited background colour or image to complement the corresponding inline foreground colour.",
"1_4_3_G18_or_G145.Abs": "This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least {{required}}:1.",
"1_4_3_G18_or_G145.BgImage": "This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least {{required}}:1.",
"1_4_3_G18_or_G145.Alpha": "This element's text or background contains transparency. Ensure the contrast ratio between the text and background are at least {{required}}:1.",
"1_4_3_G18_or_G145.Fail": "This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least {{required}}:1, but text in this element has a contrast ratio of {{value}}:1.",
"1_4_3_G18_or_G145.Abs": "This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least %{required}:1.",
"1_4_3_G18_or_G145.BgImage": "This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least %{required}:1.",
"1_4_3_G18_or_G145.Alpha": "This element's text or background contains transparency. Ensure the contrast ratio between the text and background are at least %{required}:1.",
"1_4_3_G18_or_G145.Fail": "This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least %{required}:1, but text in this element has a contrast ratio of %{value}:1.",
"1_4_3_G18_or_G145.Fail.Recomendation": "Recommendation: change",
"1_4_3_G18_or_G145.Fail.Recomendation.Text": "text colour to",
"1_4_3_G18_or_G145.Fail.Recomendation.Background": "background to",
"1_4_4_G142": "Check that text can be resized without assistive technology up to 200 percent without loss of content or functionality.",
"1_4_5_G140,C22,C30.AALevel": "If the technologies being used can achieve the visual presentation, check that text is used to convey information rather than images of text, except when the image of text is essential to the information being conveyed, or can be visually customised to the user's requirements.",
"1_4_6_G18_or_G17.Abs": "This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least {{required}}:1.",
"1_4_6_G18_or_G17.BgImage": "This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least {{required}}:1.",
"1_4_6_G18_or_G17.Fail": "This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least {{required}}:1, but text in this element has a contrast ratio of {{value}}:1.",
"1_4_6_G18_or_G17.Abs": "This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least %{required}:1.",
"1_4_6_G18_or_G17.BgImage": "This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least %{required}:1.",
"1_4_6_G18_or_G17.Fail": "This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least %{required}:1, but text in this element has a contrast ratio of %{value}:1.",
"1_4_6_G18_or_G17.Fail.Recomendation": "Recommendation: change",
"1_4_6_G18_or_G17.Fail.Recomendation.Text": "text colour to",
"1_4_6_G18_or_G17.Fail.Recomendation.Background": "background to",
Expand Down Expand Up @@ -119,8 +119,8 @@
"2_4_1_H64.1": "Iframe element requires a non-empty title attribute that identifies the frame.",
"2_4_1_H64.2": "Check that the title attribute of this element contains text that identifies the frame.",
"2_4_1_G1,G123,G124,H69": "Ensure that any common navigation elements can be bypassed; for instance, by use of skip links, header elements, or ARIA landmark roles.",
"2_4_1_G1,G123,G124.NoSuchID": "This link points to a named anchor \"{{id}}\" within the document, but no anchor exists with that name.",
"2_4_1_G1,G123,G124.NoSuchIDFragment": "This link points to a named anchor \"{{id}}\" within the document, but no anchor exists with that name in the fragment tested.",
"2_4_1_G1,G123,G124.NoSuchID": "This link points to a named anchor \"%{id}\" within the document, but no anchor exists with that name.",
"2_4_1_G1,G123,G124.NoSuchIDFragment": "This link points to a named anchor \"%{id}\" within the document, but no anchor exists with that name in the fragment tested.",
"2_4_2_H25.1.NoHeadEl": "There is no head section in which to place a descriptive title element.",
"2_4_2_H25.1.NoTitleEl": "A title should be provided for the document, using a non-empty title element in the head section.",
"2_4_2_H25.1.EmptyTitle": "The title element in the head section should be non-empty.",
Expand Down Expand Up @@ -158,7 +158,7 @@
"3_3_4_G98,G99,G155,G164,G168.LegalForms": "If this form would bind a user to a financial or legal commitment, modify/delete user-controllable data, or submit test responses, ensure that submissions are either reversible, checked for input errors, and/or confirmed by the user.",
"3_3_5_G71,G184,G193": "Check that context-sensitive help is available for this form, at a Web-page and/or control level.",
"3_3_6_G98,G99,G155,G164,G168.AllForms": "Check that submissions to this form are either reversible, checked for input errors, and/or confirmed by the user.",
"4_1_1_F77": "Duplicate id attribute value \"{{id}}\" found on the web page.",
"4_1_1_F77": "Duplicate id attribute value \"%{id}\" found on the web page.",
"4_1_2_H91.A.Empty": "Anchor element found with an ID but without a href or link text. Consider moving its ID to a parent or nearby element.",
"4_1_2_H91.A.EmptyWithName": "Anchor element found with a name attribute but without a href or link text. Consider moving the name attribute to become an ID of a parent or nearby element.",
"4_1_2_H91.A.EmptyNoId": "Anchor element found with no link content and no name and/or ID attribute.",
Expand All @@ -169,10 +169,10 @@
"4_1_2_role_of_button": "element has a role of \"button\" but",
"4_1_2_element_content": "element content",
"4_1_2_element": "element",
"4_1_2_msg_pattern": "This {{msgNodeType}} does not have a name available to an accessibility API. Valid names are: {{builtAttrs}}.",
"4_1_2_msg_pattern2": "This {{msgNodeType}} does not have a value available to an accessibility API.",
"4_1_2_msg_pattern": "This %{msgNodeType} does not have a name available to an accessibility API. Valid names are: %{builtAttrs}.",
"4_1_2_msg_pattern2": "This %{msgNodeType} does not have a value available to an accessibility API.",
"4_1_2_msg_add_one": "Add one by adding content to the element.",
"4_1_2_msg_pattern3": "This {{msgNodeType}} does not have an initially selected option. Depending on your HTML version, the value exposed to an accessibility API may be undefined.",
"4_1_2_value_exposed_using_attribute": "A value is exposed using the {{requiredValue}} attribute.",
"4_1_2_value_exposed_using_element": "A value is exposed using the {{requiredValue}} element."
"4_1_2_msg_pattern3": "This %{msgNodeType} does not have an initially selected option. Depending on your HTML version, the value exposed to an accessibility API may be undefined.",
"4_1_2_value_exposed_using_attribute": "A value is exposed using the %{requiredValue} attribute.",
"4_1_2_value_exposed_using_element": "A value is exposed using the %{requiredValue} element."
}
Loading

0 comments on commit 56a41f7

Please sign in to comment.