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

fixrules(ARIA landmark regions): Consistent ARIA landmark messages and help #1978

Merged
merged 11 commits into from
Aug 15, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ <h1 id="weather">Weather portlet</h1>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Application Role](https://www.w3.org/TR/wai-aria-1.2/#application)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ <h1 id="weather">Weather portlet</h1>

* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA practices - Accessible Names and Descriptions](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/)
* [ARIA specification - Application Role](https://www.w3.org/TR/wai-aria-1.2/#application)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ <h1 id="t1">Stock Ticker Portlet</h1">
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Article Role](https://www.w3.org/TR/wai-aria-1.2/#article)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ <h3 id="ruleMessage"></h3>

* [IBM 4.1.2 Name, Role, Value](https://www.ibm.com/able/requirements/requirements/#4_1_2)
* [ARIA practices guide](https://www.w3.org/WAI/ARIA/apg/)
* [ARIA specification](https://www.w3.org/TR/wai-aria-1.2/)]

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ <h1 id="weather">Weather portlet</h1>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Banner Role](https://www.w3.org/TR/wai-aria-1.2/#banner)]

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ <h3 id="ruleMessage"></h3>
### About this requirement

* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA practices - HTML Sectioning Elements](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/#htmlsectioningelements)
* [ARIA practices - Landmark Regions](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/)
* [ARIA specification - Banner Role](https://www.w3.org/TR/wai-aria-1.2/#banner)]

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ <h2 id="weather">Weather portlet</h2>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Complementary Role](https://www.w3.org/TR/wai-aria-1.2/#complementary)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ <h1 id="weather">Weather portlet</h1>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA specification - complementary role](https://www.w3.org/TR/wai-aria-1.2/#complementary)
* [ARIA practices - Landmark Regions](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/)
* [ARIA specification - Complementary Role](https://www.w3.org/TR/wai-aria-1.2/#complementary)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ <h3 id="ruleMessage"></h3>
<mark-down><script type="text/plain">

### Why is this important?
When there are multiple elements with a `"contentinfo"` role, they must have unique labels that clearly describe each region's content. This includes HTML `<footer>` elements when their context is a `<body>` element. These labels help people using assistive technologies to quickly find and navigate to each region.

When there are multiple elements with a `"contentinfo"` role, they must have unique labels that clearly describe each region's content.
This includes HTML `<footer>` elements when their context is a `<body>` element.
These labels help people using assistive technologies to quickly find and navigate to each region.

<!-- This is where the code snippet is injected -->
<div id="locSnippet"></div>
Expand Down Expand Up @@ -80,6 +83,7 @@ <h3 id="ruleMessage"></h3>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Contentinfo Role](https://www.w3.org/TR/wai-aria-1.2/#contentinfo)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ <h3 id="ruleMessage"></h3>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6.html)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Document Role](https://www.w3.org/TR/wai-aria-1.2/#document)]

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ <h2 id="na1"> New Account</h2>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Form Role](https://www.w3.org/TR/wai-aria-1.2/#form)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ <h3 id="ruleMessage"></h3>
* [IBM 1.3.1 Info and relationships](https://www.ibm.com/able/requirements/requirements/#1_3_1)
* [ARIA11: ARIA landmarks to identify regions of a page](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA11)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Landmark Role](https://www.w3.org/TR/wai-aria-1.2/#landmark)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h1 id="title1"> Stock Ticker portlet </h1>
### About this requirement

* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA specification - Main](https://www.w3.org/TR/wai-aria-1.2/#main)
* [ARIA specification - Main Role](https://www.w3.org/TR/wai-aria-1.2/#main)
* [ARIA practices - Landmark Regions](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/)

### Who does this affect?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ <h1 id="stocks">Stock ticker portlet</h1>
### About this requirement

* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA specification - Main Role](https://www.w3.org/TR/wai-aria-1.2/#main)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ <h2 id="weather">Weather portlet</h2>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Navigation Role](https://www.w3.org/TR/wai-aria-1.2/#navigation)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ <h3 id="ruleMessage"></h3>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Region Role](https://www.w3.org/TR/wai-aria-1.2/#region)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ <h3 id="log1">Real time log</h3>

* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA practices - Landmark Regions](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/)
* [ARIA examples - Region Landmark](https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/region.html)
* [ARIA specification - Region Role](https://www.w3.org/TR/wai-aria-1.2/#region)


### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ <h3 id="ruleMessage"></h3>
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA6: aria-label to label objects](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA6)
* [ARIA13: aria-labelledby to name regions and landmarks](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA13)
* [ARIA specification - Search Role](https://www.w3.org/TR/wai-aria-1.2/#search)

### Who does this affect?
* People using a screen reader, including blind, low vision, and neurodivergent people
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ <h2 id="ct">Complex tools</h2>

### About this requirement

* [IBM 4.1.2 Name, Role, Value](https://www.ibm.com/able/requirements/requirements/#4_1_2)
* [IBM 2.4.1 Bypass Blocks](https://www.ibm.com/able/requirements/requirements/#2_4_1)
* [ARIA16: aria-labelledby to name user interface controls](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA16)
* [ARIA specification - Toolbar Role](https://www.w3.org/TR/wai-aria-1.2/#toolbar)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export let aria_application_labelled: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Element with \"application\" role does not have an accessible name",
"group": "An element with \"application\" role must have an accessible name that describes its purpose"
"Fail_1": "Element with \"application\" role does not have a label",
"group": "Each element with \"application\" role must have a label that describes its purpose"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export let aria_attribute_required: Rule = {
"en-US": {
"group": "The required attributes for the element with a role must be defined",
"pass": "The required attributes for the element with the role are defined",
"fail_missing": "An element with ARIA role '{0}' does not have the required ARIA attribute(s): '{1}'"
"fail_missing": "Element with '{0}' role does not have the required ARIA attribute(s): '{1}'"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export let aria_banner_single: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "There is more than one element with \"banner\" role on the page",
"group": "There must be only one element with \"banner\" role on the page"
"Fail_1": "Multiple elements with \"banner\" role found on the page",
"group": "A page, document, or application should only have one element with \"banner\" role"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export let aria_complementary_label_visible: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "The element with \"complementary\" role does not have a visible label",
"Fail_1": "Element with \"complementary\" role does not have a visible label",
"group": "Each element with \"complementary\" role should have a visible label that describes its purpose"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export let aria_complementary_labelled: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "The element with \"complementary\" role does not have an accessible name",
"group": "An element with \"complementary\" role must have an accessible name"
"Fail_1": "Element with \"complementary\" role does not have a label",
"group": "Each element with \"complementary\" role must have a label that describes its purpose"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export let aria_contentinfo_misuse: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "The element with \"contentinfo\" role is present without an element with \"main\" role",
"group": "An element with \"contentinfo\" role is only permitted with an element with \"main\" role"
"Fail_1": "Element with \"contentinfo\" role is present without an element with \"main\" role",
"group": "Each element with \"contentinfo\" role is only permitted with an element with \"main\" role"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export let aria_contentinfo_single: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Multiple elements with \"contentinfo\" role found on a page",
"group": "A page, document or application should only have one element with \"contentinfo\" role"
"Fail_1": "Multiple elements with \"contentinfo\" role found on the page",
"group": "A page, document, or application should only have one element with \"contentinfo\" role"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export let aria_document_label_unique: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Multiple elements with a \"document\" role do not have unique labels",
"group": "All elements with a \"document\" role must have unique labels"
"Fail_1": "Multiple elements with \"document\" roles do not have unique labels",
"group": "Each element with \"document\" role must have a unique label that describes its purpose"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ export let aria_landmark_name_unique: Rule = {
},
messages: {
"en-US": {
"Pass_0": "Multiple \"{0}\" landmarks with the same parent region are distinguished by unique 'aria-label' or 'aria-labelledby'",
"Fail_0": "Multiple \"{0}\" landmarks with the same parent region are not distinguished from one another because they have the same \"{1}\" label",
"group": "Multiple landmarks should have a unique 'aria-labelledby' or 'aria-label' or be nested in a different parent regions"
"Pass_0": "Multiple elements with \"{0}\" landmarks within the same parent region are distinguished by unique 'aria-label' or 'aria-labelledby'",
"Fail_0": "Multiple elements with \"{0}\" landmarks within the same parent region are not distinguished from one another because they have the same \"{1}\" label",
"group": "Each landmark should have a unique 'aria-labelledby' or 'aria-label' or be nested in a different parent region"
}
},
rulesets: [{
"id": ["IBM_Accessibility", "IBM_Accessibility_next"],
"num": ["1.3.1"],
"num": ["2.4.1"], //remapped to 2.4.1 to be consistent with all landmark region rules
"level": eRulePolicy.VIOLATION,
"toolkitLevel": eToolkitLevel.LEVEL_THREE
},
{
"id": ["WCAG_2_1", "WCAG_2_0", "WCAG_2_2"],
"num": ["1.3.1"],
"num": ["2.4.1"],
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export let aria_main_label_unique: Rule = {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Multiple elements with \"main\" role do not have unique labels",
"group": "Elements with \"main\" role must have unique labels"
"group": "Each element with \"main\" role must have unique label that describes its purposes"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export let aria_parent_required: Rule = {
},
messages: {
"en-US": {
"group": "An element with an implicit or explicit role must be contained within a valid element",
"group": "Each element with an implicit or explicit role must be contained within a valid element",
"Pass_0": "Rule Passed",
"Fail_1": "The element with role \"{0}\" is not contained in or owned by an element with one of the following roles: \"{1}\""
"Fail_1": "Element with \"{0}\" role is not contained in or owned by an element with one of the following roles: \"{1}\""
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export let aria_region_label_unique: Rule = {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Multiple elements with \"region\" role do not have unique labels",
"group": "Each element with a \"region\" role must have a unique label"
"group": "Each element with \"region\" role must have a unique label that describes its purpose"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export let aria_region_labelled: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Element with a \"region\" role does not have an accessible name",
"Fail_2": "The element with \"region\" role is not labeled with an 'aria-label' or 'aria-labelledby'",
"group": "Each element with \"region\" role must have an accessible name that describes its purpose"
"Fail_1": "Element with \"region\" role does not have a label",
"Fail_2": "Element with \"region\" role is not labeled with 'aria-label' or 'aria-labelledby'",
"group": "Each element with \"region\" role must have a label that describes its purpose"
}
},
rulesets: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export let aria_toolbar_label_unique: Rule = {
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Fail_1": "Multiple toolbar components do not have unique labels",
"group": "All toolbar components on a page must have unique labels specified"
"Fail_1": "Multiple elements with \"toolbar\" roles do not have unique labels",
"group": "Each element with \"toolbar\" role must have a unique label that describes its purpose"
}
},
rulesets: [{
"id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"],
"num": ["4.1.2"],
"num": ["2.4.1"], //updated mapping to match other landmark regions rules
"level": eRulePolicy.VIOLATION,
"toolkitLevel": eToolkitLevel.LEVEL_ONE
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h3>WAI-ARIA role valid attribute test</h3>
"aria": "/document[1]/separator[3]"
},
"reasonId": "fail_missing",
"message": "An element with ARIA role 'separator' does not have the required ARIA attribute(s): 'aria-valuenow'",
"message": "Element with 'separator' role does not have the required ARIA attribute(s): 'aria-valuenow'",
"messageArgs": [
"separator",
"aria-valuenow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2 id="rightnavheading">Institutional Links</h2>
"aria": "/document[1]/main[1]/navigation[1]"
},
"reasonId": "Fail_0",
"message": "Multiple \"navigation\" landmarks with the same parent region are not distinguished from one another because they have the same \"Institutional Links\" label",
"message": "Multiple elements with \"navigation\" landmarks within the same parent region are not distinguished from one another because they have the same \"Institutional Links\" label",
"messageArgs": [
"navigation",
"Institutional Links"
Expand All @@ -74,7 +74,7 @@ <h2 id="rightnavheading">Institutional Links</h2>
"aria": "/document[1]/main[1]/navigation[2]"
},
"reasonId": "Fail_0",
"message": "Multiple \"navigation\" landmarks with the same parent region are not distinguished from one another because they have the same \"Institutional Links\" label",
"message": "Multiple elements with \"navigation\" landmarks within the same parent region are not distinguished from one another because they have the same \"Institutional Links\" label",
"messageArgs": [
"navigation",
"Institutional Links"
Expand Down
Loading
Loading