@uuv/a11y 1.0.0-beta.6 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.0.0-beta.6](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.5...a11y-v1.0.0-beta.6) (2024-01-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * **a11y:** add RGAA 1.1.6 and 1.1.3, [#429](https://github.com/Orange-OpenSource/uuv/issues/429) ([0e65889](https://github.com/Orange-OpenSource/uuv/commit/0e65889b479651c27e16c29fdb8e5123fe689f03))
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **runner-playwright:** update dependency axe-core to v4.8.3 ([4623485](https://github.com/Orange-OpenSource/uuv/commit/46234851677cf0e5f0479fe30bc786ae2a607f1e))
12
+
1
13
  ## [1.0.0-beta.5](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.4...a11y-v1.0.0-beta.5) (2024-01-21)
2
14
 
3
15
 
@@ -1,7 +1,10 @@
1
- export interface IAttributeSpecification {
1
+ export declare class EmptyAttributeSpecification implements IAttributeSpecification {
2
2
  isSatisfiedBy(element: HTMLElement, attributeName: string): boolean;
3
3
  }
4
- export declare class EmptyAttributeSpecification implements IAttributeSpecification {
4
+ export declare class NotEmptyAttributeSpecification implements IAttributeSpecification {
5
+ isSatisfiedBy(element: HTMLElement, attributeName: string): boolean;
6
+ }
7
+ export interface IAttributeSpecification {
5
8
  isSatisfiedBy(element: HTMLElement, attributeName: string): boolean;
6
9
  }
7
10
  export declare class EmptyElementWithIdSpecification implements IAttributeSpecification {
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EmptyElementWithIdSpecification = exports.EmptyAttributeSpecification = void 0;
6
+ exports.EmptyElementWithIdSpecification = exports.NotEmptyAttributeSpecification = exports.EmptyAttributeSpecification = void 0;
7
7
  const lodash_1 = __importDefault(require("lodash"));
8
8
  // eslint-disable-next-line @typescript-eslint/no-var-requires
9
9
  const $ = require("jquery/dist/jquery.min");
@@ -14,6 +14,13 @@ class EmptyAttributeSpecification {
14
14
  }
15
15
  }
16
16
  exports.EmptyAttributeSpecification = EmptyAttributeSpecification;
17
+ class NotEmptyAttributeSpecification {
18
+ isSatisfiedBy(element, attributeName) {
19
+ const attributeValue = element.getAttribute(attributeName);
20
+ return !lodash_1.default.isEmpty(attributeValue);
21
+ }
22
+ }
23
+ exports.NotEmptyAttributeSpecification = NotEmptyAttributeSpecification;
17
24
  class EmptyElementWithIdSpecification {
18
25
  isSatisfiedBy(element, attributeName) {
19
26
  const attributeValue = element.getAttribute(attributeName);
@@ -10,6 +10,11 @@ export declare class AttributeChecker {
10
10
  * @param attributeName : HTMLElement attributeName
11
11
  */
12
12
  static emptyAttribute(attributeName: string): CompliantSpecification;
13
+ /**
14
+ * Check if the value of the attributeName is not empty
15
+ * @param attributeName : HTMLElement attributeName
16
+ */
17
+ static notEmptyAttribute(attributeName: string): CompliantSpecification;
13
18
  /**
14
19
  * Check that the text of the HTMLElement whose id matches the value of the attribute named attributeName another HTMLElement is empty
15
20
  * @param attributeName : HTMLElement attribute name
@@ -19,6 +19,13 @@ class AttributeChecker {
19
19
  static emptyAttribute(attributeName) {
20
20
  return new CompliantSpecification(attributeName, new attribut_specification_1.EmptyAttributeSpecification());
21
21
  }
22
+ /**
23
+ * Check if the value of the attributeName is not empty
24
+ * @param attributeName : HTMLElement attributeName
25
+ */
26
+ static notEmptyAttribute(attributeName) {
27
+ return new CompliantSpecification(attributeName, new attribut_specification_1.NotEmptyAttributeSpecification());
28
+ }
22
29
  /**
23
30
  * Check that the text of the HTMLElement whose id matches the value of the attribute named attributeName another HTMLElement is empty
24
31
  * @param attributeName : HTMLElement attribute name
@@ -4,7 +4,9 @@
4
4
  "1.1.2",
5
5
  "1.1.3",
6
6
  "1.1.5",
7
- "1.1.6"
7
+ "1.1.6",
8
+ "2.1.1",
9
+ "2.2.1"
8
10
  ],
9
11
  "inProgress": [
10
12
  "1.1.4",
@@ -8,8 +8,10 @@ exports.default = [
8
8
  wcag: "4.1.2 A",
9
9
  id: "2.1.1",
10
10
  elementType: "iframe",
11
- query: new query_1.ByTagQuery([
12
- "iframe:not([title]),frame:not([title])"
11
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
12
+ "iframe", "frame"
13
+ ]), [
14
+ query_1.AttributeChecker.emptyAttribute("title"),
13
15
  ]),
14
16
  description: "iframe has no title",
15
17
  help: "set a title to iframe"
@@ -19,9 +21,10 @@ exports.default = [
19
21
  wcag: "4.1.2 A",
20
22
  id: "2.2.1",
21
23
  elementType: "iframe",
22
- query: new query_1.ByTagQuery([
23
- "iframe[title]",
24
- "frame[title]"
24
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
25
+ "iframe", "frame"
26
+ ]), [
27
+ query_1.AttributeChecker.notEmptyAttribute("title"),
25
28
  ]),
26
29
  attributes: [
27
30
  "title"
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/a11y",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "type": "commonjs",
5
5
  "author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
6
6
  "description": "A javascript lib for running a11y validation based on multiple reference(RGAA, etc)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/a11y",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.7",
4
4
  "type": "commonjs",
5
5
  "author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
6
6
  "description": "A javascript lib for running a11y validation based on multiple reference(RGAA, etc)",