testaro 72.1.3 → 72.2.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "72.1.3",
4
- "description": "Run 1000 web accessibility tests from 11 tools and get a standardized report",
3
+ "version": "72.2.1",
4
+ "description": "Run 1300 web accessibility tests from 10 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build:nameComputation": "esbuild src/nameComputation.js --bundle --format=iife --global-name=computeAccessibleName --outfile=dist/nameComputation.js",
@@ -35,7 +35,9 @@ exports.reporter = async (page, catalog, withItems) => {
35
35
  // Get whether it is focusable.
36
36
  const isFocusable = element.tabIndex === 0;
37
37
  // Get the operable tagnames.
38
- const opTags = new Set(['A', 'BUTTON', 'IFRAME', 'INPUT','OPTION', 'SELECT', 'TEXTAREA']);
38
+ const opTags = new Set(
39
+ ['A', 'BUTTON', 'IFRAME', 'INPUT','OPTION', 'SELECT', 'SUMMARY', 'TEXTAREA']
40
+ );
39
41
  // Get the operable roles.
40
42
  const opRoles = new Set([
41
43
  'button',
package/testaro/focInd.js CHANGED
@@ -43,20 +43,20 @@ exports.reporter = async (page, catalog, withItems) => {
43
43
  if (isFocusable) {
44
44
  // Get its live style declaration.
45
45
  const styleDec = window.getComputedStyle(element);
46
- // If the element has an outline before being focused:
47
- if (styleDec.outlineWidth !== '0px') {
46
+ // If the element has a visible outline before being focused:
47
+ if (styleDec.outlineStyle !== 'none' && styleDec.outlineWidth !== '0px') {
48
48
  // Return a violation description.
49
49
  return 'Element is focusable but has an outline when blurred';
50
50
  }
51
51
  // Otherwise, i.e. if the element has no outline, focus the element.
52
52
  element.focus({preventScroll: true});
53
53
  // If it now has no outline:
54
- if (styleDec.outlineWidth === '0px') {
54
+ if (styleDec.outlineWidth === '0px' || styleDec.outlineStyle === 'none') {
55
55
  // Return a violation description.
56
56
  return 'Element when focused has no outline';
57
57
  }
58
58
  // Otherwise, if it now has an outline thinner than 2 pixels:
59
- if (Number.parseFloat(styleDec.outlineWidth) < 2) {
59
+ if (Number.parseFloat(styleDec.outlineWidth) < 2 && styleDec.outlineStyle !== 'none') {
60
60
  // Return a violation description.
61
61
  return 'Element when focused has an outline thinner than 2 pixels';
62
62
  }