Skip to content

Commit

Permalink
Merge branch 'master' into dev-1301
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy authored Apr 28, 2023
2 parents 845c562 + 48d6ff7 commit 2e093cf
Show file tree
Hide file tree
Showing 9 changed files with 516 additions and 372 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h3 id="ruleMessage"></h3>
[text](https://html.spec.whatwg.org/multipage/input.html#text-%28type=text%29-state-and-search-state-%28type=search%29), [search](https://html.spec.whatwg.org/multipage/input.html#text-%28type=text%29-state-and-search-state-%28type=search%29), [tel](https://html.spec.whatwg.org/multipage/input.html#telephone-state-%28type=tel%29), [url](https://html.spec.whatwg.org/multipage/input.html#url-state-%28type=url%29), and [email](https://html.spec.whatwg.org/multipage/input.html#e-mail-state-%28type=email%29)
(or inputs with a missing or invalid type) that also have a [list](https://html.spec.whatwg.org/multipage/input.html#attr-input-list) attribute have an implicit role of combobox, which in turn has an implicit `aria-haspopup="listbox"`;
therefore, developers should not explicitly assign the `aria-haspopup` attribute, which will be either redundant or possibly conflicting.
When HTML elements use both `aria-*` attributes and their HTML implied equivalents, browsers **_must_** ignore the explicit (redundant or conflicting) ARIA attribute the native HTML attribute with their [implied ARIA semantics](https://www.w3.org/TR/wai-aria-1.1/#implicit_semantics) take precedence.
When HTML elements use both `aria-*` attributes and their HTML implied equivalents, browsers **_must_** ignore the explicit (redundant or conflicting) ARIA attribute the native HTML attribute with their [implied ARIA semantics](https://www.w3.org/TR/wai-aria-1.2/#implicit_semantics) take precedence.

* To ensure that Assistive Technologies (AT) can gather information, proper coding is required so that the end users can understand and interact with the content.
If standard HTML controls are created according to specification, the conditions of this provision will be met.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export let HAAC_Figure_label: Rule = {
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["1.1.1"],
"level": eRulePolicy.VIOLATION,
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
act: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export let RPT_Header_HasContent: Rule = {
},
messages: {
"en-US": {
"Pass_0": "Rule Passed",
"Pass_0": "Heading element has descriptive text",
"Fail_1": "Heading element has no descriptive content",
"group": "Heading elements must provide descriptive text"
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["2.4.6"],
"level": eRulePolicy.VIOLATION,
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_ONE
}],
act: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export let element_tabbable_role_valid: Rule = {
}
if (value) return null;
}

// handle the case: no tabindex or tabindex < 0
if (!ruleContext.hasAttribute("tabindex") || parseInt(ruleContext.getAttribute("tabindex")) < 0)
return null;
Expand All @@ -74,12 +74,16 @@ export let element_tabbable_role_valid: Rule = {
|| styles['overflow-x'] === 'auto' || styles['overflow-y'] === 'auto')
return null;

let roles = RPTUtil.getRoles(ruleContext, false);
// ignore 'application' role that contains one or more focusable elements that do not follow a standard interaction pattern supported by a widget role:https://www.w3.org/TR/2023/PR-WAI-ARIA-1.2-20230328/#application
if (roles && roles.includes("application"))
return null;

// elements whose roles allow no descendants that are interactive or with a tabindex >= 0
// this case should be handled in IBMA_Focus_MultiTab and Rpt_Aria_MissingFocusableChild
const roles_no_interactive_child =["button", "checkbox", "img", "link", "menuitem", "menuitemcheckbox", "menuitemradio",
"option", "radio", "switch", "tab"];

let roles = RPTUtil.getRoles(ruleContext, false);
if (!roles || roles.length === 0) {
roles = RPTUtil.getImplicitRole(ruleContext);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Sandbox</title>
<meta charset="UTF-8" />
</head>

<body>
<main>
<h1>Test page</h1>
<div role="application" tabindex="0"></div>
<div role="application" tabindex="-1"></div>
</main>
<script>
UnitTest = {
ruleIds: ["element_tabbable_role_valid"],
results: [

]
};
</script>
</body>
</html>
Loading

0 comments on commit 2e093cf

Please sign in to comment.