-
Notifications
You must be signed in to change notification settings - Fork 0
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
build(deps): bump eslint-plugin-jsx-a11y from 6.10.0 to 6.10.2 #1358
Merged
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-plugin-jsx-a11y-6.10.2
Nov 1, 2024
Merged
build(deps): bump eslint-plugin-jsx-a11y from 6.10.0 to 6.10.2 #1358
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-plugin-jsx-a11y-6.10.2
Nov 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) from 6.10.0 to 6.10.2. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-jsx-a11y@v6.10.0...v6.10.2) --- updated-dependencies: - dependency-name: eslint-plugin-jsx-a11y dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
bot
added
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
labels
Nov 1, 2024
Diff between eslint-plugin-jsx-a11y 6.10.0 and 6.10.2diff --git a/lib/rules/accessible-emoji.js b/lib/rules/accessible-emoji.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/accessible-emoji.js
+++ b/lib/rules/accessible-emoji.js
@@ -13,5 +13,5 @@
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
- * @fileoverview Enforce emojis are wrapped in <span> and provide screenreader access.
+ * @fileoverview Enforce emojis are wrapped in <span> and provide screen reader access.
* @author Ethan Cohen
*/
@@ -26,5 +26,5 @@
meta: {
docs: {
- description: 'Enforce emojis are wrapped in `<span>` and provide screenreader access.',
+ description: 'Enforce emojis are wrapped in `<span>` and provide screen reader access.',
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md'
},
diff --git a/__tests__/src/rules/anchor-ambiguous-text-test.js b/__tests__/src/rules/anchor-ambiguous-text-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/anchor-ambiguous-text-test.js
+++ b/__tests__/src/rules/anchor-ambiguous-text-test.js
@@ -28,5 +28,5 @@
const expectedErrorGenerator = (words) => ({
- message: `Ambiguous text within anchor. Screenreader users rely on link text for context; the words "${words.join('", "')}" are ambiguous and do not provide enough context.`,
+ message: `Ambiguous text within anchor. Screen reader users rely on link text for context; the words "${words.join('", "')}" are ambiguous and do not provide enough context.`,
type: 'JSXOpeningElement',
});
diff --git a/lib/rules/anchor-ambiguous-text.js b/lib/rules/anchor-ambiguous-text.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/anchor-ambiguous-text.js
+++ b/lib/rules/anchor-ambiguous-text.js
@@ -53,5 +53,5 @@
context.report({
node,
- message: 'Ambiguous text within anchor. Screenreader users rely on link text for context; the words "{{wordsList}}" are ambiguous and do not provide enough context.',
+ message: 'Ambiguous text within anchor. Screen reader users rely on link text for context; the words "{{wordsList}}" are ambiguous and do not provide enough context.',
data: {
wordsList: words.join('", "')
diff --git a/__tests__/src/rules/aria-props-test.js b/__tests__/src/rules/aria-props-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/aria-props-test.js
+++ b/__tests__/src/rules/aria-props-test.js
@@ -20,5 +20,5 @@
const ruleTester = new RuleTester();
-const ariaAttributes = [...aria.keys()];
+const ariaAttributes = aria.keys();
const errorMessage = (name) => {
diff --git a/lib/rules/aria-props.js b/lib/rules/aria-props.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/aria-props.js
+++ b/lib/rules/aria-props.js
@@ -10,16 +10,14 @@
var _getSuggestion = _interopRequireDefault(require("../util/getSuggestion"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /**
+/**
* @fileoverview Enforce all aria-* properties are valid.
* @author Ethan Cohen
- */ // ----------------------------------------------------------------------------
+ */
+
+// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
-var ariaAttributes = _toConsumableArray(_ariaQuery.aria.keys());
+
+var ariaAttributes = _ariaQuery.aria.keys();
var errorMessage = function errorMessage(name) {
var suggestions = (0, _getSuggestion["default"])(name, ariaAttributes);
diff --git a/__tests__/src/rules/aria-role-test.js b/__tests__/src/rules/aria-role-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/aria-role-test.js
+++ b/__tests__/src/rules/aria-role-test.js
@@ -25,5 +25,5 @@
};
-const roleKeys = [...roles.keys()];
+const roleKeys = roles.keys();
const validRoles = roleKeys.filter((role) => roles.get(role).abstract === false);
@@ -85,7 +85,6 @@
settings: customDivSettings,
},
- {
- code: '<svg role="graphics-document document" />',
- },
+ { code: '<svg role="graphics-document document" />' },
+ { code: '<svg role="img" />' },
)).concat(validTests).map(parserOptionsMapper),
diff --git a/lib/rules/aria-role.js b/lib/rules/aria-role.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/aria-role.js
+++ b/lib/rules/aria-role.js
@@ -7,6 +7,4 @@
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
-var _Iterator = _interopRequireDefault(require("es-iterator-helpers/Iterator.from"));
-var _IteratorPrototype = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.filter"));
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _schemas = require("../util/schemas");
@@ -35,5 +33,5 @@
}
});
-var validRoles = new Set((0, _IteratorPrototype["default"])((0, _Iterator["default"])(_ariaQuery.roles.keys()), function (role) {
+var validRoles = new Set(_ariaQuery.roles.keys().filter(function (role) {
return _ariaQuery.roles.get(role)["abstract"] === false;
}));
diff --git a/__tests__/src/rules/aria-unsupported-elements-test.js b/__tests__/src/rules/aria-unsupported-elements-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/aria-unsupported-elements-test.js
+++ b/__tests__/src/rules/aria-unsupported-elements-test.js
@@ -27,5 +27,5 @@
});
-const domElements = [...dom.keys()];
+const domElements = dom.keys();
// Generate valid test cases
const roleValidityTests = domElements.map((element) => {
diff --git a/lib/rules/aria-unsupported-elements.js b/lib/rules/aria-unsupported-elements.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/aria-unsupported-elements.js
+++ b/lib/rules/aria-unsupported-elements.js
@@ -10,19 +10,18 @@
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /**
+/**
* @fileoverview Enforce that elements that do not support ARIA roles,
* states and properties do not have those attributes.
* @author Ethan Cohen
- */ // ----------------------------------------------------------------------------
+ */
+
+// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
+
var errorMessage = function errorMessage(invalidProp) {
return "This element does not support ARIA roles, states and properties. Try removing the prop '".concat(invalidProp, "'.");
};
+var invalidAttributes = new Set(_ariaQuery.aria.keys().concat('role'));
var schema = (0, _schemas.generateObjSchema)();
var _default = exports["default"] = {
@@ -47,5 +46,4 @@
return;
}
- var invalidAttributes = new Set([].concat(_toConsumableArray(_ariaQuery.aria.keys()), ['role']));
node.attributes.forEach(function (prop) {
if (prop.type === 'JSXSpreadAttribute') {
diff --git a/__tests__/src/rules/control-has-associated-label-test.js b/__tests__/src/rules/control-has-associated-label-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/control-has-associated-label-test.js
+++ b/__tests__/src/rules/control-has-associated-label-test.js
@@ -158,5 +158,4 @@
{ code: '<table />' },
{ code: '<tbody />' },
- { code: '<td />' },
{ code: '<tfoot />' },
{ code: '<thead />' },
@@ -264,4 +263,5 @@
{ code: '<option />', errors: [expectedError] },
{ code: '<th />', errors: [expectedError] },
+ { code: '<td />', errors: [expectedError] },
// Interactive Roles
{ code: '<div role="button" />', errors: [expectedError] },
diff --git a/__mocks__/genInteractives.js b/__mocks__/genInteractives.js
index v6.10.0..v6.10.2 100644
--- a/__mocks__/genInteractives.js
+++ b/__mocks__/genInteractives.js
@@ -13,6 +13,6 @@
import type { JSXElementMockType } from './JSXElementMock';
-const domElements = [...dom.keys()];
-const roleNames = [...roles.keys()];
+const domElements = dom.keys();
+const roleNames = roles.keys();
const interactiveElementsMap = {
@@ -46,12 +46,12 @@
'input[type="url"]': [{ prop: 'type', value: 'url' }],
'input[type="week"]': [{ prop: 'type', value: 'week' }],
- link: [{ prop: 'href', value: '#' }],
menuitem: [],
option: [],
select: [],
+ summary: [],
// Whereas ARIA makes a distinction between cell and gridcell, the AXObject
// treats them both as CellRole and since gridcell is interactive, we consider
// cell interactive as well.
- // td: [],
+ td: [],
th: [],
tr: [],
@@ -62,11 +62,13 @@
const nonInteractiveElementsMap: {[string]: Array<{[string]: string}>} = {
abbr: [],
+ address: [],
+ article: [],
aside: [],
- article: [],
blockquote: [],
- body: [],
br: [],
caption: [],
+ code: [],
dd: [],
+ del: [],
details: [],
dfn: [],
@@ -75,4 +77,5 @@
dl: [],
dt: [],
+ em: [],
fieldset: [],
figcaption: [],
@@ -80,5 +83,4 @@
footer: [],
form: [],
- frame: [],
h1: [],
h2: [],
@@ -88,6 +90,8 @@
h6: [],
hr: [],
+ html: [],
iframe: [],
img: [],
+ ins: [],
label: [],
legend: [],
@@ -108,7 +112,9 @@
'section[aria-label]': [{ prop: 'aria-label' }],
'section[aria-labelledby]': [{ prop: 'aria-labelledby' }],
+ strong: [],
+ sub: [],
+ sup: [],
table: [],
tbody: [],
- td: [],
tfoot: [],
thead: [],
@@ -117,9 +123,9 @@
};
-const indeterminantInteractiveElementsMap: { [key: string]: Array<any> } = fromEntries(domElements.map((name: string) => [name, []]));
+const indeterminantInteractiveElementsMap: { [key: string]: Array<any> } = fromEntries(domElements.map((name) => [name, []]));
Object.keys(interactiveElementsMap)
.concat(Object.keys(nonInteractiveElementsMap))
- .forEach((name: string) => delete indeterminantInteractiveElementsMap[name]);
+ .forEach((name) => delete indeterminantInteractiveElementsMap[name]);
const abstractRoles = roleNames.filter((role) => roles.get(role).abstract);
diff --git a/lib/util/implicitRoles/img.js b/lib/util/implicitRoles/img.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/implicitRoles/img.js
+++ b/lib/util/implicitRoles/img.js
@@ -10,8 +10,21 @@
*/
function getImplicitRoleForImg(attributes) {
+ var _getLiteralPropValue;
var alt = (0, _jsxAstUtils.getProp)(attributes, 'alt');
if (alt && (0, _jsxAstUtils.getLiteralPropValue)(alt) === '') {
return '';
}
+
+ /**
+ * If the src attribute can be determined to be an svg, allow the role to be set to 'img'
+ * so that VoiceOver on Safari can be better supported.
+ *
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#identifying_svg_as_an_image
+ * @see https://bugs.webkit.org/show_bug.cgi?id=216364
+ */
+ var src = (0, _jsxAstUtils.getProp)(attributes, 'src');
+ if (src && (_getLiteralPropValue = (0, _jsxAstUtils.getLiteralPropValue)(src)) !== null && _getLiteralPropValue !== void 0 && _getLiteralPropValue.includes('.svg')) {
+ return '';
+ }
return 'img';
}
diff --git a/lib/rules/interactive-supports-focus.js b/lib/rules/interactive-supports-focus.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/interactive-supports-focus.js
+++ b/lib/rules/interactive-supports-focus.js
@@ -19,14 +19,10 @@
var _getTabIndex = _interopRequireDefault(require("../util/getTabIndex"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /**
+/**
* @fileoverview Enforce that elements with onClick handlers must be tabbable.
* @author Ethan Cohen
*
*/
+
// ----------------------------------------------------------------------------
// Rule Definition
@@ -34,6 +30,5 @@
var schema = (0, _schemas.generateObjSchema)({
- // TODO: convert to use iterFilter and iterFrom
- tabbable: (0, _schemas.enumArraySchema)(_toConsumableArray(_ariaQuery.roles.keys()).filter(function (name) {
+ tabbable: (0, _schemas.enumArraySchema)(_ariaQuery.roles.keys().filter(function (name) {
return !_ariaQuery.roles.get(name)["abstract"] && _ariaQuery.roles.get(name).superClass.some(function (klasses) {
return (0, _arrayIncludes["default"])(klasses, 'widget');
diff --git a/lib/util/isAbstractRole.js b/lib/util/isAbstractRole.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/isAbstractRole.js
+++ b/lib/util/isAbstractRole.js
@@ -7,8 +7,5 @@
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
-var _Iterator = _interopRequireDefault(require("es-iterator-helpers/Iterator.from"));
-var _IteratorPrototype = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.filter"));
-function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-var abstractRoles = new Set((0, _IteratorPrototype["default"])((0, _Iterator["default"])(_ariaQuery.roles.keys()), function (role) {
+var abstractRoles = new Set(_ariaQuery.roles.keys().filter(function (role) {
return _ariaQuery.roles.get(role)["abstract"];
}));
diff --git a/lib/util/isInteractiveElement.js b/lib/util/isInteractiveElement.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/isInteractiveElement.js
+++ b/lib/util/isInteractiveElement.js
@@ -9,7 +9,4 @@
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
-var _Iterator = _interopRequireDefault(require("es-iterator-helpers/Iterator.from"));
-var _IteratorPrototype = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.filter"));
-var _IteratorPrototype2 = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.some"));
var _attributesComparator = _interopRequireDefault(require("./attributesComparator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -23,6 +20,6 @@
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // import iterFlatMap from 'es-iterator-helpers/Iterator.prototype.flatMap';
-var roleKeys = _toConsumableArray(_ariaQuery.roles.keys());
+function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
+var roleKeys = _ariaQuery.roles.keys();
var elementRoleEntries = _toConsumableArray(_ariaQuery.elementRoles);
var nonInteractiveRoles = new Set(roleKeys.filter(function (name) {
@@ -50,6 +47,4 @@
// aria-activedescendant, thus in practice we treat it as a widget.
'toolbar'));
-
-// TODO: convert to use iterFlatMap and iterFrom
var interactiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
@@ -60,6 +55,4 @@
}) ? [elementSchema] : [];
});
-
-// TODO: convert to use iterFlatMap and iterFrom
var nonInteractiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
@@ -70,9 +63,7 @@
}) ? [elementSchema] : [];
});
-var interactiveAXObjects = new Set((0, _IteratorPrototype["default"])((0, _Iterator["default"])(_axobjectQuery.AXObjects.keys()), function (name) {
+var interactiveAXObjects = new Set(_axobjectQuery.AXObjects.keys().filter(function (name) {
return _axobjectQuery.AXObjects.get(name).type === 'widget';
}));
-
-// TODO: convert to use iterFlatMap and iterFrom
var interactiveElementAXObjectSchemas = (0, _arrayPrototype["default"])(_toConsumableArray(_axobjectQuery.elementAXObjects), function (_ref5) {
var _ref6 = _slicedToArray(_ref5, 2),
@@ -88,12 +79,7 @@
}
- // TODO: remove this when aria-query and axobject-query are upgraded
- if (tagName === 'summary') {
- return false;
- }
-
// Check in elementRoles for inherent interactive role associations for
// this element.
- var isInherentInteractiveElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(interactiveElementRoleSchemas), elementSchemaMatcher);
+ var isInherentInteractiveElement = interactiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentInteractiveElement) {
return true;
@@ -101,10 +87,10 @@
// Check in elementRoles for inherent non-interactive role associations for
// this element.
- var isInherentNonInteractiveElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(nonInteractiveElementRoleSchemas), elementSchemaMatcher);
+ var isInherentNonInteractiveElement = nonInteractiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentNonInteractiveElement) {
return false;
}
// Check in elementAXObjects for AX Tree associations for this element.
- var isInteractiveAXElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(interactiveElementAXObjectSchemas), elementSchemaMatcher);
+ var isInteractiveAXElement = interactiveElementAXObjectSchemas.some(elementSchemaMatcher);
if (isInteractiveAXElement) {
return true;
diff --git a/lib/util/isInteractiveRole.js b/lib/util/isInteractiveRole.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/isInteractiveRole.js
+++ b/lib/util/isInteractiveRole.js
@@ -10,11 +10,5 @@
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
-var roles = _toConsumableArray(_ariaQuery.roles.keys());
+var roles = _ariaQuery.roles.keys();
var interactiveRoles = roles.filter(function (name) {
return !_ariaQuery.roles.get(name)["abstract"] && _ariaQuery.roles.get(name).superClass.some(function (klasses) {
diff --git a/lib/util/isNonInteractiveElement.js b/lib/util/isNonInteractiveElement.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/isNonInteractiveElement.js
+++ b/lib/util/isNonInteractiveElement.js
@@ -9,7 +9,4 @@
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
-var _Iterator = _interopRequireDefault(require("es-iterator-helpers/Iterator.from"));
-var _IteratorPrototype = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.filter"));
-var _IteratorPrototype2 = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.some"));
var _attributesComparator = _interopRequireDefault(require("./attributesComparator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -23,6 +20,6 @@
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // import iterFlatMap from 'es-iterator-helpers/Iterator.prototype.flatMap';
-var roleKeys = _toConsumableArray(_ariaQuery.roles.keys());
+function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
+var roleKeys = _ariaQuery.roles.keys();
var elementRoleEntries = _toConsumableArray(_ariaQuery.elementRoles);
var nonInteractiveRoles = new Set(roleKeys.filter(function (name) {
@@ -56,6 +53,4 @@
// aria-activedescendant, thus in practice we treat it as a widget.
'toolbar'));
-
-// TODO: convert to use iterFlatMap and iterFrom
var interactiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
@@ -66,6 +61,4 @@
}) ? [elementSchema] : [];
});
-
-// TODO: convert to use iterFlatMap and iterFrom
var nonInteractiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
@@ -76,9 +69,7 @@
}) ? [elementSchema] : [];
});
-var nonInteractiveAXObjects = new Set((0, _IteratorPrototype["default"])((0, _Iterator["default"])(_axobjectQuery.AXObjects.keys()), function (name) {
+var nonInteractiveAXObjects = new Set(_axobjectQuery.AXObjects.keys().filter(function (name) {
return (0, _arrayIncludes["default"])(['window', 'structure'], _axobjectQuery.AXObjects.get(name).type);
}));
-
-// TODO: convert to use iterFlatMap and iterFrom
var nonInteractiveElementAXObjectSchemas = (0, _arrayPrototype["default"])(_toConsumableArray(_axobjectQuery.elementAXObjects), function (_ref5) {
var _ref6 = _slicedToArray(_ref5, 2),
@@ -91,9 +82,10 @@
function checkIsNonInteractiveElement(tagName, attributes) {
function elementSchemaMatcher(elementSchema) {
- return tagName === elementSchema.name && (0, _attributesComparator["default"])(elementSchema.attributes, attributes);
+ return tagName === elementSchema.name && tagName !== 'td' // TODO: investigate why this is needed
+ && (0, _attributesComparator["default"])(elementSchema.attributes, attributes);
}
// Check in elementRoles for inherent non-interactive role associations for
// this element.
- var isInherentNonInteractiveElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(nonInteractiveElementRoleSchemas), elementSchemaMatcher);
+ var isInherentNonInteractiveElement = nonInteractiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentNonInteractiveElement) {
return true;
@@ -101,10 +93,10 @@
// Check in elementRoles for inherent interactive role associations for
// this element.
- var isInherentInteractiveElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(interactiveElementRoleSchemas), elementSchemaMatcher);
+ var isInherentInteractiveElement = interactiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentInteractiveElement) {
return false;
}
// Check in elementAXObjects for AX Tree associations for this element.
- var isNonInteractiveAXElement = (0, _IteratorPrototype2["default"])((0, _Iterator["default"])(nonInteractiveElementAXObjectSchemas), elementSchemaMatcher);
+ var isNonInteractiveAXElement = nonInteractiveElementAXObjectSchemas.some(elementSchemaMatcher);
if (isNonInteractiveAXElement) {
return true;
diff --git a/lib/util/isNonInteractiveRole.js b/lib/util/isNonInteractiveRole.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/isNonInteractiveRole.js
+++ b/lib/util/isNonInteractiveRole.js
@@ -10,11 +10,5 @@
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
-var nonInteractiveRoles = _toConsumableArray(_ariaQuery.roles.keys()).filter(function (name) {
+var nonInteractiveRoles = _ariaQuery.roles.keys().filter(function (name) {
return !_ariaQuery.roles.get(name)["abstract"] && !_ariaQuery.roles.get(name).superClass.some(function (klasses) {
return (0, _arrayIncludes["default"])(klasses, 'widget');
diff --git a/__tests__/src/rules/label-has-associated-control-test.js b/__tests__/src/rules/label-has-associated-control-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/label-has-associated-control-test.js
+++ b/__tests__/src/rules/label-has-associated-control-test.js
@@ -87,4 +87,5 @@
{ code: '<label>foo<textarea /></label>' },
// Custom controlComponents.
+ { code: '<label>A label<CustomInput /></label>', options: [{ controlComponents: ['CustomInput'] }] },
{ code: '<label><span>A label<CustomInput /></span></label>', options: [{ controlComponents: ['CustomInput'] }] },
{ code: '<label><span>A label<CustomInput /></span></label>', settings: componentsSettings },
@@ -142,4 +143,5 @@
{ code: '<label><span><span><span><input aria-label="A label" /></span></span></span></label>', options: [{ depth: 5 }], errors: [expectedError] },
// Custom controlComponents.
+ { code: '<label>A label<OtherCustomInput /></label>', options: [{ controlComponents: ['CustomInput'] }], errors: [expectedError] },
{ code: '<label><span>A label<CustomInput /></span></label>', options: [{ controlComponents: ['CustomInput'] }], errors: [expectedError] },
{ code: '<CustomLabel><span>A label<CustomInput /></span></CustomLabel>', options: [{ controlComponents: ['CustomInput'], labelComponents: ['CustomLabel'] }], errors: [expectedError] },
diff --git a/lib/util/mayContainChildComponent.js b/lib/util/mayContainChildComponent.js
index v6.10.0..v6.10.2 100644
--- a/lib/util/mayContainChildComponent.js
+++ b/lib/util/mayContainChildComponent.js
@@ -35,5 +35,5 @@
return true;
}
- // Check for comonents with the provided name.
+ // Check for components with the provided name.
if (childNode.type === 'JSXElement' && childNode.openingElement && (0, _minimatch["default"])(elementType(childNode.openingElement), componentName)) {
return true;
diff --git a/__tests__/src/rules/no-access-key-test.js b/__tests__/src/rules/no-access-key-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/no-access-key-test.js
+++ b/__tests__/src/rules/no-access-key-test.js
@@ -20,5 +20,5 @@
const expectedError = {
- message: 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create a11y complications.',
+ message: 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screen readers and keyboard-only users create a11y complications.',
type: 'JSXOpeningElement',
};
diff --git a/lib/rules/no-access-key.js b/lib/rules/no-access-key.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/no-access-key.js
+++ b/lib/rules/no-access-key.js
@@ -16,5 +16,5 @@
// ----------------------------------------------------------------------------
-var errorMessage = 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create a11y complications.';
+var errorMessage = 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screen readers and keyboard-only users create a11y complications.';
var schema = (0, _schemas.generateObjSchema)();
var _default = exports["default"] = {
@@ -22,5 +22,5 @@
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md',
- description: 'Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader.'
+ description: 'Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.'
},
schema: [schema]
diff --git a/__tests__/src/rules/no-noninteractive-element-interactions-test.js b/__tests__/src/rules/no-noninteractive-element-interactions-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/no-noninteractive-element-interactions-test.js
+++ b/__tests__/src/rules/no-noninteractive-element-interactions-test.js
@@ -70,4 +70,5 @@
{ code: '<a onClick={() => void 0} href="http://x.y.z" tabIndex="0" />' },
{ code: '<area onClick={() => {}} />;' },
+ { code: '<body onClick={() => {}} />;' },
{ code: '<button onClick={() => void 0} className="foo" />' },
{ code: '<menuitem onClick={() => {}} />;' },
@@ -78,5 +79,4 @@
/* HTML elements with neither an interactive or non-interactive valence (static) */
{ code: '<acronym onClick={() => {}} />;' },
- { code: '<address onClick={() => {}} />;' },
{ code: '<applet onClick={() => {}} />;' },
{ code: '<audio onClick={() => {}} />;' },
@@ -91,5 +91,4 @@
{ code: '<center onClick={() => {}} />;' },
{ code: '<cite onClick={() => {}} />;' },
- { code: '<code onClick={() => {}} />;' },
{ code: '<col onClick={() => {}} />;' },
{ code: '<colgroup onClick={() => {}} />;' },
@@ -97,5 +96,4 @@
{ code: '<data onClick={() => {}} />;' },
{ code: '<datalist onClick={() => {}} />;' },
- { code: '<del onClick={() => {}} />;' },
{ code: '<div />;' },
{ code: '<div className="foo" />;' },
@@ -108,5 +106,4 @@
{ code: '<div onClick={null} />;' },
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} />;' },
- { code: '<em onClick={() => {}} />;' },
{ code: '<embed onClick={() => {}} />;' },
{ code: '<font onClick={() => {}} />;' },
@@ -122,9 +119,9 @@
`,
},
+ { code: '<frame onClick={() => {}} />;' },
{ code: '<frameset onClick={() => {}} />;' },
{ code: '<head onClick={() => {}} />;' },
{ code: '<header onClick={() => {}} />;' },
{ code: '<hgroup onClick={() => {}} />;' },
- { code: '<html onClick={() => {}} />;' },
{ code: '<i onClick={() => {}} />;' },
{ code: '<iframe onLoad={() => {}} />;' },
@@ -154,5 +151,4 @@
`,
},
- { code: '<ins onClick={() => {}} />;' },
{ code: '<kbd onClick={() => {}} />;' },
{ code: '<keygen onClick={() => {}} />;' },
@@ -179,12 +175,10 @@
{ code: '<span onClick={() => {}} />;' },
{ code: '<strike onClick={() => {}} />;' },
- { code: '<strong onClick={() => {}} />;' },
{ code: '<style onClick={() => {}} />;' },
- { code: '<sub onClick={() => {}} />;' },
{ code: '<summary onClick={() => {}} />;' },
- { code: '<sup onClick={() => {}} />;' },
{ code: '<th onClick={() => {}} />;' },
{ code: '<title onClick={() => {}} />;' },
{ code: '<track onClick={() => {}} />;' },
+ { code: '<td onClick={() => {}} />;' },
{ code: '<tt onClick={() => {}} />;' },
{ code: '<u onClick={() => {}} />;' },
@@ -287,11 +281,13 @@
/* HTML elements with an inherent, non-interactive role */
{ code: '<main onClick={() => void 0} />;', errors: [expectedError] },
+ { code: '<address onClick={() => {}} />;', errors: [expectedError] },
{ code: '<article onClick={() => {}} />;', errors: [expectedError] },
{ code: '<aside onClick={() => {}} />;', errors: [expectedError] },
{ code: '<blockquote onClick={() => {}} />;', errors: [expectedError] },
- { code: '<body onClick={() => {}} />;', errors: [expectedError] },
{ code: '<br onClick={() => {}} />;', errors: [expectedError] },
{ code: '<caption onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<code onClick={() => {}} />;', errors: [expectedError] },
{ code: '<dd onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<del onClick={() => {}} />;', errors: [expectedError] },
{ code: '<details onClick={() => {}} />;', errors: [expectedError] },
{ code: '<dfn onClick={() => {}} />;', errors: [expectedError] },
@@ -299,4 +295,5 @@
{ code: '<dir onClick={() => {}} />;', errors: [expectedError] },
{ code: '<dt onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<em onClick={() => {}} />;', errors: [expectedError] },
{ code: '<fieldset onClick={() => {}} />;', errors: [expectedError] },
{ code: '<figcaption onClick={() => {}} />;', errors: [expectedError] },
@@ -304,5 +301,4 @@
{ code: '<footer onClick={() => {}} />;', errors: [expectedError] },
{ code: '<form onClick={() => {}} />;', errors: [expectedError] },
- { code: '<frame onClick={() => {}} />;', errors: [expectedError] },
{ code: '<h1 onClick={() => {}} />;', errors: [expectedError] },
{ code: '<h2 onClick={() => {}} />;', errors: [expectedError] },
@@ -312,6 +308,8 @@
{ code: '<h6 onClick={() => {}} />;', errors: [expectedError] },
{ code: '<hr onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<html onClick={() => {}} />;', errors: [expectedError] },
{ code: '<iframe onClick={() => {}} />;', errors: [expectedError] },
{ code: '<img onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<ins onClick={() => {}} />;', errors: [expectedError] },
{ code: '<label onClick={() => {}} />;', errors: [expectedError] },
{ code: '<legend onClick={() => {}} />;', errors: [expectedError] },
@@ -331,7 +329,9 @@
{ code: '<section onClick={() => {}} aria-label="Aardvark" />;', errors: [expectedError] },
{ code: '<section onClick={() => {}} aria-labelledby="js_1" />;', errors: [expectedError] },
+ { code: '<strong onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<sub onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<sup onClick={() => {}} />;', errors: [expectedError] },
{ code: '<table onClick={() => {}} />;', errors: [expectedError] },
{ code: '<tbody onClick={() => {}} />;', errors: [expectedError] },
- { code: '<td onClick={() => {}} />;', errors: [expectedError] },
{ code: '<tfoot onClick={() => {}} />;', errors: [expectedError] },
{ code: '<thead onClick={() => {}} />;', errors: [expectedError] },
diff --git a/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js b/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js
+++ b/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js
@@ -51,4 +51,9 @@
{ code: '<area role="menuitem" />;' },
{ code: '<button className="foo" role="button" />' },
+ { code: '<body role="button" />;' },
+ { code: '<frame role="button" />;' },
+ { code: '<td role="button" />;' },
+ { code: '<frame role="menuitem" />;' },
+ { code: '<td role="menuitem" />;' },
/* All flavors of input */
{ code: '<input role="button" />' },
@@ -155,5 +160,4 @@
/* HTML elements with neither an interactive or non-interactive valence (static) */
{ code: '<acronym role="button" />;' },
- { code: '<address role="button" />;' },
{ code: '<applet role="button" />;' },
{ code: '<audio role="button" />;' },
@@ -167,5 +171,4 @@
{ code: '<center role="button" />;' },
{ code: '<cite role="button" />;' },
- { code: '<code role="button" />;' },
{ code: '<col role="button" />;' },
{ code: '<colgroup role="button" />;' },
@@ -173,5 +176,4 @@
{ code: '<data role="button" />;' },
{ code: '<datalist role="button" />;' },
- { code: '<del role="button" />;' },
{ code: '<div role="button" />;' },
{ code: '<div className="foo" role="button" />;' },
@@ -183,5 +185,4 @@
{ code: '<div {...props} role="button" />;' },
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} role="button" />;' },
- { code: '<em role="button" />;' },
{ code: '<embed role="button" />;' },
{ code: '<font role="button" />;' },
@@ -190,7 +191,5 @@
{ code: '<header role="button" />;' },
{ code: '<hgroup role="button" />;' },
- { code: '<html role="button" />;' },
{ code: '<i role="button" />;' },
- { code: '<ins role="button" />;' },
{ code: '<kbd role="button" />;' },
{ code: '<keygen role="button" />;' },
@@ -215,9 +214,6 @@
{ code: '<span role="button" />;' },
{ code: '<strike role="button" />;' },
- { code: '<strong role="button" />;' },
{ code: '<style role="button" />;' },
- { code: '<sub role="button" />;' },
{ code: '<summary role="button" />;' },
- { code: '<sup role="button" />;' },
{ code: '<th role="button" />;' },
{ code: '<title role="button" />;' },
@@ -359,17 +355,19 @@
/* HTML elements with an inherent non-interactive role, assigned an
* interactive role. */
- { code: '<main role="button" />;', errors: [expectedError] },
+ { code: '<address role="button" />;', errors: [expectedError] },
{ code: '<article role="button" />;', errors: [expectedError] },
{ code: '<aside role="button" />;', errors: [expectedError] },
{ code: '<blockquote role="button" />;', errors: [expectedError] },
- { code: '<body role="button" />;', errors: [expectedError] },
{ code: '<br role="button" />;', errors: [expectedError] },
{ code: '<caption role="button" />;', errors: [expectedError] },
+ { code: '<code role="button" />;', errors: [expectedError] },
{ code: '<dd role="button" />;', errors: [expectedError] },
+ { code: '<del role="button" />;', errors: [expectedError] },
{ code: '<details role="button" />;', errors: [expectedError] },
+ { code: '<dfn role="button" />;', errors: [expectedError] },
{ code: '<dir role="button" />;', errors: [expectedError] },
{ code: '<dl role="button" />;', errors: [expectedError] },
- { code: '<dfn role="button" />;', errors: [expectedError] },
{ code: '<dt role="button" />;', errors: [expectedError] },
+ { code: '<em role="button" />;', errors: [expectedError] },
{ code: '<fieldset role="button" />;', errors: [expectedError] },
{ code: '<figcaption role="button" />;', errors: [expectedError] },
@@ -377,5 +375,4 @@
{ code: '<footer role="button" />;', errors: [expectedError] },
{ code: '<form role="button" />;', errors: [expectedError] },
- { code: '<frame role="button" />;', errors: [expectedError] },
{ code: '<h1 role="button" />;', errors: [expectedError] },
{ code: '<h2 role="button" />;', errors: [expectedError] },
@@ -385,9 +382,12 @@
{ code: '<h6 role="button" />;', errors: [expectedError] },
{ code: '<hr role="button" />;', errors: [expectedError] },
+ { code: '<html role="button" />;', errors: [expectedError] },
{ code: '<iframe role="button" />;', errors: [expectedError] },
{ code: '<img role="button" />;', errors: [expectedError] },
+ { code: '<ins role="button" />;', errors: [expectedError] },
{ code: '<label role="button" />;', errors: [expectedError] },
{ code: '<legend role="button" />;', errors: [expectedError] },
{ code: '<li role="button" />;', errors: [expectedError] },
+ { code: '<main role="button" />;', errors: [expectedError] },
{ code: '<mark role="button" />;', errors: [expectedError] },
{ code: '<marquee role="button" />;', errors: [expectedError] },
@@ -401,7 +401,9 @@
{ code: '<progress role="button" />;', errors: [expectedError] },
{ code: '<ruby role="button" />;', errors: [expectedError] },
+ { code: '<strong role="button" />;', errors: [expectedError] },
+ { code: '<sub role="button" />;', errors: [expectedError] },
+ { code: '<sup role="button" />;', errors: [expectedError] },
{ code: '<table role="button" />;', errors: [expectedError] },
{ code: '<tbody role="button" />;', errors: [expectedError] },
- { code: '<td role="button" />;', errors: [expectedError] },
{ code: '<tfoot role="button" />;', errors: [expectedError] },
{ code: '<thead role="button" />;', errors: [expectedError] },
@@ -418,5 +420,4 @@
{ code: '<figure role="menuitem" />;', errors: [expectedError] },
{ code: '<form role="menuitem" />;', errors: [expectedError] },
- { code: '<frame role="menuitem" />;', errors: [expectedError] },
{ code: '<h1 role="menuitem" />;', errors: [expectedError] },
{ code: '<h2 role="menuitem" />;', errors: [expectedError] },
@@ -433,5 +434,4 @@
{ code: '<table role="menuitem" />;', errors: [expectedError] },
{ code: '<tbody role="menuitem" />;', errors: [expectedError] },
- { code: '<td role="menuitem" />;', errors: [expectedError] },
{ code: '<tfoot role="menuitem" />;', errors: [expectedError] },
{ code: '<thead role="menuitem" />;', errors: [expectedError] },
diff --git a/__tests__/src/rules/no-redundant-roles-test.js b/__tests__/src/rules/no-redundant-roles-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/no-redundant-roles-test.js
+++ b/__tests__/src/rules/no-redundant-roles-test.js
@@ -84,4 +84,6 @@
{ code: '<ol role="list" />' },
{ code: '<dl role="list" />' },
+ { code: '<img src="example.svg" role="img" />' },
+ { code: '<svg role="img" />' },
))
.map(ruleOptionsMapperFactory(listException))
@@ -90,4 +92,6 @@
{ code: '<ul role="list" />', errors: [expectedError('ul', 'list')] },
{ code: '<ol role="list" />', errors: [expectedError('ol', 'list')] },
+ { code: '<img role="img" />', errors: [expectedError('img', 'img')] },
+ { code: '<img src={someVariable} role="img" />', errors: [expectedError('img', 'img')] },
))
.map(parserOptionsMapper),
diff --git a/__tests__/src/rules/no-static-element-interactions-test.js b/__tests__/src/rules/no-static-element-interactions-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/no-static-element-interactions-test.js
+++ b/__tests__/src/rules/no-static-element-interactions-test.js
@@ -86,5 +86,5 @@
{ code: '<form onClick={() => {}} />;' },
{ code: '<form onSubmit={() => {}} />;' },
- { code: '<link onClick={() => {}} href="#" />;' },
+ // { code: '<link onClick={() => {}} href="#" />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" onClick={() => {}} />;' },
@@ -112,18 +112,21 @@
{ code: '<div role="presentation" onKeyDown={() => {}} />;' },
/* HTML elements with an inherent, non-interactive role */
+ { code: '<address onClick={() => {}} />;' },
{ code: '<article onClick={() => {}} />;' },
{ code: '<article onDblClick={() => void 0} />;' },
{ code: '<aside onClick={() => {}} />;' },
{ code: '<blockquote onClick={() => {}} />;' },
- { code: '<body onClick={() => {}} />;' },
{ code: '<br onClick={() => {}} />;' },
{ code: '<canvas onClick={() => {}} />;' },
{ code: '<caption onClick={() => {}} />;' },
+ { code: '<code onClick={() => {}} />;' },
+ { code: '<dd onClick={() => {}} />;' },
+ { code: '<del onClick={() => {}} />;' },
{ code: '<details onClick={() => {}} />;' },
- { code: '<dd onClick={() => {}} />;' },
{ code: '<dfn onClick={() => {}} />;' },
{ code: '<dir onClick={() => {}} />;' },
{ code: '<dl onClick={() => {}} />;' },
{ code: '<dt onClick={() => {}} />;' },
+ { code: '<em onClick={() => {}} />;' },
{ code: '<embed onClick={() => {}} />;' },
{ code: '<fieldset onClick={() => {}} />;' },
@@ -131,5 +134,4 @@
{ code: '<figure onClick={() => {}} />;' },
{ code: '<footer onClick={() => {}} />;' },
- { code: '<frame onClick={() => {}} />;' },
{ code: '<h1 onClick={() => {}} />;' },
{ code: '<h2 onClick={() => {}} />;' },
@@ -139,6 +141,8 @@
{ code: '<h6 onClick={() => {}} />;' },
{ code: '<hr onClick={() => {}} />;' },
+ { code: '<html onClick={() => {}} />;' },
{ code: '<iframe onClick={() => {}} />;' },
{ code: '<img onClick={() => {}} />;' },
+ { code: '<ins onClick={() => {}} />;' },
{ code: '<label onClick={() => {}} />;' },
{ code: '<legend onClick={() => {}} />;' },
@@ -159,4 +163,8 @@
{ code: '<section onClick={() => {}} aria-label="Aa" />;' },
{ code: '<section onClick={() => {}} aria-labelledby="js_1" />;' },
+ { code: '<strong onClick={() => {}} />;' },
+ { code: '<sub onClick={() => {}} />;' },
+ { code: '<summary onClick={() => {}} />;' },
+ { code: '<sup onClick={() => {}} />;' },
{ code: '<table onClick={() => {}} />;' },
{ code: '<tbody onClick={() => {}} />;' },
@@ -223,5 +231,5 @@
{ code: '<div role="tablist" onClick={() => {}} />;' },
{ code: '<div role="tabpanel" onClick={() => {}} />;' },
- { code: '<td onClick={() => {}} />;' },
+ // { code: '<td onClick={() => {}} />;' },
{ code: '<div role="term" onClick={() => {}} />;' },
{ code: '<div role="timer" onClick={() => {}} />;' },
@@ -284,11 +292,10 @@
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} />;', errors: [expectedError] },
/* Static elements; no inherent role */
+ { code: '<a onClick={() => {}} />;', errors: [expectedError] },
{ code: '<a onClick={() => void 0} />', errors: [expectedError] },
- { code: '<a onClick={() => {}} />;', errors: [expectedError] },
{ code: '<a tabIndex="0" onClick={() => void 0} />', errors: [expectedError] },
- { code: '<area onClick={() => {}} />;', errors: [expectedError] },
{ code: '<acronym onClick={() => {}} />;', errors: [expectedError] },
- { code: '<address onClick={() => {}} />;', errors: [expectedError] },
{ code: '<applet onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<area onClick={() => {}} />;', errors: [expectedError] },
{ code: '<b onClick={() => {}} />;', errors: [expectedError] },
{ code: '<base onClick={() => {}} />;', errors: [expectedError] },
@@ -297,21 +304,18 @@
{ code: '<big onClick={() => {}} />;', errors: [expectedError] },
{ code: '<blink onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<body onClick={() => {}} />;', errors: [expectedError] },
{ code: '<center onClick={() => {}} />;', errors: [expectedError] },
{ code: '<cite onClick={() => {}} />;', errors: [expectedError] },
- { code: '<code onClick={() => {}} />;', errors: [expectedError] },
{ code: '<col onClick={() => {}} />;', errors: [expectedError] },
{ code: '<colgroup onClick={() => {}} />;', errors: [expectedError] },
{ code: '<content onClick={() => {}} />;', errors: [expectedError] },
{ code: '<data onClick={() => {}} />;', errors: [expectedError] },
- { code: '<del onClick={() => {}} />;', errors: [expectedError] },
- { code: '<em onClick={() => {}} />;', errors: [expectedError] },
{ code: '<font onClick={() => {}} />;', errors: [expectedError] },
+ { code: '<frame onClick={() => {}} />;', errors: [expectedError] },
{ code: '<frameset onClick={() => {}} />;', errors: [expectedError] },
{ code: '<head onClick={() => {}} />;', errors: [expectedError] },
{ code: '<header onClick={() => {}} />;', errors: [expectedError] },
{ code: '<hgroup onClick={() => {}} />;', errors: [expectedError] },
- { code: '<html onClick={() => {}} />;', errors: [expectedError] },
{ code: '<i onClick={() => {}} />;', errors: [expectedError] },
- { code: '<ins onClick={() => {}} />;', errors: [expectedError] },
{ code: '<kbd onClick={() => {}} />;', errors: [expectedError] },
{ code: '<keygen onClick={() => {}} />;', errors: [expectedError] },
@@ -336,9 +340,5 @@
{ code: '<span onClick={() => {}} />;', errors: [expectedError] },
{ code: '<strike onClick={() => {}} />;', errors: [expectedError] },
- { code: '<strong onClick={() => {}} />;', errors: [expectedError] },
{ code: '<style onClick={() => {}} />;', errors: [expectedError] },
- { code: '<sub onClick={() => {}} />;', errors: [expectedError] },
- { code: '<sup onClick={() => {}} />;', errors: [expectedError] },
- { code: '<summary onClick={() => {}} />;', errors: [expectedError] },
{ code: '<title onClick={() => {}} />;', errors: [expectedError] },
{ code: '<track onClick={() => {}} />;', errors: [expectedError] },
diff --git a/__tests__/src/rules/prefer-tag-over-role-test.js b/__tests__/src/rules/prefer-tag-over-role-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/prefer-tag-over-role-test.js
+++ b/__tests__/src/rules/prefer-tag-over-role-test.js
@@ -40,5 +40,5 @@
expectedError(
'link',
- '<a href=...>, <area href=...>, or <link href=...>',
+ '<a href=...>, or <area href=...>',
),
],
diff --git a/__tests__/src/rules/role-has-required-aria-props-test.js b/__tests__/src/rules/role-has-required-aria-props-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/role-has-required-aria-props-test.js
+++ b/__tests__/src/rules/role-has-required-aria-props-test.js
@@ -11,7 +11,4 @@
import { roles } from 'aria-query';
import { RuleTester } from 'eslint';
-import iterFrom from 'es-iterator-helpers/Iterator.from';
-import map from 'es-iterator-helpers/Iterator.prototype.map';
-import toArray from 'es-iterator-helpers/Iterator.prototype.toArray';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
@@ -43,5 +40,5 @@
// Create basic test cases using all valid role types.
-const basicValidityTests = toArray(map(iterFrom(roles.keys()), (role) => {
+const basicValidityTests = roles.keys().map((role) => {
const {
requiredProps: requiredPropKeyValues,
@@ -53,5 +50,5 @@
code: `<div role="${role.toLowerCase()}" ${propChain} />`,
};
-}));
+});
ruleTester.run('role-has-required-aria-props', rule, {
@@ -70,4 +67,6 @@
{ code: '<input type="checkbox" role="switch" />' },
{ code: '<MyComponent role="checkbox" aria-checked="false" aria-labelledby="foo" tabindex="0" />', settings: componentsSettings },
+ { code: '<div role="heading" aria-level={2} />' },
+ { code: '<div role="heading" aria-level="3" />' },
)).concat(basicValidityTests).map(parserOptionsMapper),
diff --git a/lib/rules/role-has-required-aria-props.js b/lib/rules/role-has-required-aria-props.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/role-has-required-aria-props.js
+++ b/lib/rules/role-has-required-aria-props.js
@@ -11,20 +11,19 @@
var _isSemanticRoleElement = _interopRequireDefault(require("../util/isSemanticRoleElement"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
-function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
-function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
-function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
-function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /**
+/**
* @fileoverview Enforce that elements with ARIA roles must
* have all required attributes for that role.
* @author Ethan Cohen
- */ // ----------------------------------------------------------------------------
+ */
+
+// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
+
var errorMessage = function errorMessage(role, requiredProps) {
return "Elements with the ARIA role \"".concat(role, "\" must have the following attributes defined: ").concat(String(requiredProps).toLowerCase());
};
var schema = (0, _schemas.generateObjSchema)();
+var roleKeys = _ariaQuery.roles.keys();
var _default = exports["default"] = {
meta: {
@@ -58,5 +57,5 @@
var normalizedValues = String(roleAttrValue).toLowerCase().split(' ');
var validRoles = normalizedValues.filter(function (val) {
- return _toConsumableArray(_ariaQuery.roles.keys()).indexOf(val) > -1;
+ return roleKeys.indexOf(val) > -1;
});
diff --git a/__tests__/src/rules/role-supports-aria-props-test.js b/__tests__/src/rules/role-supports-aria-props-test.js
index v6.10.0..v6.10.2 100644
--- a/__tests__/src/rules/role-supports-aria-props-test.js
+++ b/__tests__/src/rules/role-supports-aria-props-test.js
@@ -15,8 +15,4 @@
import { version as eslintVersion } from 'eslint/package.json';
import semver from 'semver';
-import iterFrom from 'es-iterator-helpers/Iterator.from';
-import filter from 'es-iterator-helpers/Iterator.prototype.filter';
-import map from 'es-iterator-helpers/Iterator.prototype.map';
-import toArray from 'es-iterator-helpers/Iterator.prototype.toArray';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
@@ -51,5 +47,5 @@
};
-const nonAbstractRoles = toArray(filter(iterFrom(roles.keys()), (role) => roles.get(role).abstract === false));
+const nonAbstractRoles = roles.keys().filter((role) => roles.get(role).abstract === false);
const createTests = (rolesNames) => rolesNames.reduce((tests, role) => {
@@ -58,8 +54,7 @@
} = roles.get(role);
const validPropsForRole = Object.keys(propKeyValues);
- const invalidPropsForRole = filter(
- map(iterFrom(aria.keys()), (attribute) => attribute.toLowerCase()),
- (attribute) => validPropsForRole.indexOf(attribute) === -1,
- );
+ const invalidPropsForRole = aria.keys()
+ .map((attribute) => attribute.toLowerCase())
+ .filter((attribute) => validPropsForRole.indexOf(attribute) === -1);
const normalRole = role.toLowerCase();
@@ -68,8 +63,8 @@
code: `<div role="${normalRole}" ${prop.toLowerCase()} />`,
}))),
- tests[1].concat(toArray(map(invalidPropsForRole, (prop) => ({
+ tests[1].concat(invalidPropsForRole.map((prop) => ({
code: `<div role="${normalRole}" ${prop.toLowerCase()} />`,
errors: [errorMessage(prop.toLowerCase(), normalRole, 'div', false)],
- })))),
+ }))),
];
}, [[], []]);
@@ -414,5 +409,5 @@
/>
);
-
+
const Hello = (props) => <div>{props.frag}</div>;
`,
diff --git a/lib/rules/role-supports-aria-props.js b/lib/rules/role-supports-aria-props.js
index v6.10.0..v6.10.2 100644
--- a/lib/rules/role-supports-aria-props.js
+++ b/lib/rules/role-supports-aria-props.js
@@ -7,6 +7,4 @@
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
-var _Iterator = _interopRequireDefault(require("es-iterator-helpers/Iterator.from"));
-var _IteratorPrototype = _interopRequireDefault(require("es-iterator-helpers/Iterator.prototype.filter"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
@@ -55,8 +53,8 @@
}
- // Make sure it has no aria-* properties defined outside of its property set.
+ // Make sure it has no aria-* properties defined outside its property set.
var _roles$get = _ariaQuery.roles.get(roleValue),
propKeyValues = _roles$get.props;
- var invalidAriaPropsForRole = new Set((0, _IteratorPrototype["default"])((0, _Iterator["default"])(_ariaQuery.aria.keys()), function (attribute) {
+ var invalidAriaPropsForRole = new Set(_ariaQuery.aria.keys().filter(function (attribute) {
return !(attribute in propKeyValues);
}));
diff --git a/package.json b/package.json
index v6.10.0..v6.10.2 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
"name": "eslint-plugin-jsx-a11y",
- "version": "6.10.0",
+ "version": "6.10.2",
"description": "Static AST checker for accessibility rules on JSX elements.",
"keywords": [
@@ -42,11 +42,10 @@
},
"devDependencies": {
- "@babel/cli": "^7.25.6",
- "@babel/core": "^7.25.2",
- "@babel/eslint-parser": "^7.25.1",
- "@babel/plugin-transform-flow-strip-types": "^7.25.2",
- "@babel/register": "^7.24.6",
- "auto-changelog": "^2.4.0",
- "babel-jest": "^24.9.0",
+ "@babel/cli": "^7.25.9",
+ "@babel/core": "^7.26.0",
+ "@babel/eslint-parser": "^7.25.9",
+ "@babel/plugin-transform-flow-strip-types": "^7.25.9",
+ "@babel/register": "^7.25.9",
+ "auto-changelog": "^2.5.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-preset-airbnb": "^5.0.0",
@@ -56,10 +55,10 @@
"eslint-plugin-eslint-plugin": "^4.3.0",
"eslint-plugin-flowtype": "^5.8.0 || ^8.0.3",
- "eslint-plugin-import": "^2.29.1",
+ "eslint-plugin-import": "^2.31.0",
"estraverse": "^5.3.0",
"flow-bin": "^0.147.0",
"in-publish": "^2.0.1",
"jackspeak": "=2.1.1",
- "jscodeshift": "^0.7.1",
+ "jscodeshift": "^17.0.0",
"minimist": "^1.2.8",
"npmignore": "^0.3.1",
@@ -69,5 +68,5 @@
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.1",
- "tape": "^5.8.1",
+ "tape": "^5.9.0",
"to-ast": "^1.0.0"
},
@@ -77,5 +76,5 @@
"license": "MIT",
"dependencies": {
- "aria-query": "~5.1.3",
+ "aria-query": "^5.3.2",
"array-includes": "^3.1.8",
"array.prototype.flatmap": "^1.3.2",
@@ -85,5 +84,4 @@
"damerau-levenshtein": "^1.0.8",
"emoji-regex": "^9.2.2",
- "es-iterator-helpers": "^1.0.19",
"hasown": "^2.0.2",
"jsx-ast-utils": "^3.3.5",
@@ -92,5 +90,5 @@
"object.fromentries": "^2.0.8",
"safe-regex-test": "^1.0.3",
- "string.prototype.includes": "^2.0.0"
+ "string.prototype.includes": "^2.0.1"
},
"peerDependencies": {
diff --git a/docs/rules/accessible-emoji.md b/docs/rules/accessible-emoji.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/accessible-emoji.md
+++ b/docs/rules/accessible-emoji.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Emoji have become a common way of communicating content to the end user. To a person using a screenreader, however, they may not be aware that this content is there at all. By wrapping the emoji in a `<span>`, giving it the `role="img"`, and providing a useful description in `aria-label`, the screenreader will treat the emoji as an image in the accessibility tree with an accessible name for the end user.
+Emoji have become a common way of communicating content to the end user. To a person using a screen reader, however, they may not be aware that this content is there at all. By wrapping the emoji in a `<span>`, giving it the `role="img"`, and providing a useful description in `aria-label`, the screen reader will treat the emoji as an image in the accessibility tree with an accessible name for the end user.
## Rule details
diff --git a/docs/rules/anchor-ambiguous-text.md b/docs/rules/anchor-ambiguous-text.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/anchor-ambiguous-text.md
+++ b/docs/rules/anchor-ambiguous-text.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Enforces `<a>` values are not exact matches for the phrases "click here", "here", "link", "a link", or "learn more". Screenreaders announce tags as links/interactive, but rely on values for context. Ambiguous anchor descriptions do not provide sufficient context for users.
+Enforces `<a>` values are not exact matches for the phrases "click here", "here", "link", "a link", or "learn more". Screen readers announce tags as links/interactive, but rely on values for context. Ambiguous anchor descriptions do not provide sufficient context for users.
## Rule options
diff --git a/CHANGELOG.md b/CHANGELOG.md
index v6.10.0..v6.10.2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,4 +6,33 @@
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v6.10.2](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.10.1...v6.10.2) - 2024-10-25
+
+### Fixed
+
+- [patch] `no-redundandant-roles`: allow `<img src="*.svg" role="img" />` [`#936`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/936)
+
+### Commits
+
+- [meta] fix changelog URLs [`0d01a1a`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/0d01a1aff796802bca70183b24978ffebdbef073)
+- [Refactor] remove no-longer-needed `es-iterator-helpers` [`aa075bd`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/aa075bd1897e0b0bb61683e4da68558f38511dae)
+- [Refactor] avoid spreading things that are already arrays [`d15d3ab`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/d15d3abace7afe833d0988eaf3fb7cc166c05c06)
+- [Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `@babel/register` [`5dad7c4`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/5dad7c4fdfdc56c6e488fab54f25f602430dad30)
+- [Tests] `aria-role`: Add valid test for `<svg role="img" />` [`daba189`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/daba18974473bce1301ffaafb822558a9e1738ae)
+- [Docs] `label-has-associated-control`: add line breaks for readability [`0bc6378`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/0bc63781c8f284ac6bef00321763c13c5bea6b9f)
+- [Tests] `label-has-associated-control`: add additional test cases [`30d2318`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/30d23189d0b6354750c31a622204a9dc412dc2c1)
+- [Tests] Add tests to reinforce required attributes for role="heading" [`d92446c`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/d92446c6e608617a4c75173e8b0917c06be14dc6)
+
+## [v6.10.1](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.10.0...v6.10.1) - 2024-10-20
+
+### Commits
+
+- [Fix] handle interactive/noninteractive changes from aria-query [`4925ba8`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/4925ba8d0bf80a4b1d8e8645d310590bf1b40b64)
+- [Docs] Use consistent spelling of 'screen reader' [`cb6788c`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/cb6788c56d7108f2faa102d041dfa37dbc0e9f59)
+- [Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `@babel/register`, `auto-changelog`, `eslint-plugin-import`, `tape` [`518a77e`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/518a77e1e23fb2b1df2e8a97d14bfdd08aded797)
+- [Deps] update `es-iterator-helpers`, `string.prototype.includes` [`eed03a3`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/eed03a31f313442158cf7d702443723ad4800dec)
+- [meta] package.json - Update jscodeshift & remove babel-jest [`2ee940c`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/2ee940c5ae87bcd0d384b6dc565d630ea70e103a)
+- [Docs] Remove accidental whitespace in CONTRIBUTING.md [`a262131`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/a26213142854ffe3d931fab35f0ee4e6ae101875)
+- [Deps] unpin `aria-query` [`e517937`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/e51793729e5e366e30d2f3bf0f253f2bdb9e6523)
+
## [v6.10.0](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.9.0...v6.10.0) - 2024-09-03
diff --git a/docs/rules/click-events-have-key-events.md b/docs/rules/click-events-have-key-events.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/click-events-have-key-events.md
+++ b/docs/rules/click-events-have-key-events.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Enforce `onClick` is accompanied by at least one of the following: `onKeyUp`, `onKeyDown`, `onKeyPress`. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users. This does not apply for interactive or hidden elements.
+Enforce `onClick` is accompanied by at least one of the following: `onKeyUp`, `onKeyDown`, `onKeyPress`. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screen reader users. This does not apply for interactive or hidden elements.
## Rule details
diff --git a/docs/rules/img-redundant-alt.md b/docs/rules/img-redundant-alt.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/img-redundant-alt.md
+++ b/docs/rules/img-redundant-alt.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Enforce img alt attribute does not contain the word image, picture, or photo. Screenreaders already announce `img` elements as an image. There is no need to use words such as *image*, *photo*, and/or *picture*.
+Enforce img alt attribute does not contain the word image, picture, or photo. Screen readers already announce `img` elements as an image. There is no need to use words such as *image*, *photo*, and/or *picture*.
## Rule options
diff --git a/docs/rules/label-has-associated-control.md b/docs/rules/label-has-associated-control.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/label-has-associated-control.md
+++ b/docs/rules/label-has-associated-control.md
@@ -105,7 +105,11 @@
`labelComponents` is a list of custom React Component names that should be checked for an associated control.
+
`labelAttributes` is a list of attributes to check on the label component and its children for a label. Use this if you have a custom component that uses a string passed on a prop to render an HTML `label`, for example.
+
`controlComponents` is a list of custom React Components names that will output an input element. [Glob format](https://linuxhint.com/bash_globbing_tutorial/) is also supported for specifying names (e.g., `Label*` matches `LabelComponent` but not `CustomLabel`, `????Label` matches `LinkLabel` but not `CustomLabel`).
+
`assert` asserts that the label has htmlFor, a nested label, both or either. Available options: `'htmlFor', 'nesting', 'both', 'either'`.
+
`depth` (default 2, max 25) is an integer that determines how deep within a `JSXElement` label the rule should look for text content or an element with a label to determine if the `label` element will have an accessible label.
diff --git a/docs/rules/mouse-events-have-key-events.md b/docs/rules/mouse-events-have-key-events.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/mouse-events-have-key-events.md
+++ b/docs/rules/mouse-events-have-key-events.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Enforce onmouseover/onmouseout are accompanied by onfocus/onblur. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users.
+Enforce onmouseover/onmouseout are accompanied by onfocus/onblur. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screen reader users.
## Rule options
diff --git a/docs/rules/no-access-key.md b/docs/rules/no-access-key.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/no-access-key.md
+++ b/docs/rules/no-access-key.md
@@ -5,5 +5,5 @@
<!-- end auto-generated rule header -->
-Enforce no accessKey prop on element. Access keys are HTML attributes that allow web developers to assign keyboard shortcuts to elements. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create accessibility complications so to avoid complications, access keys should not be used.
+Enforce no accessKey prop on element. Access keys are HTML attributes that allow web developers to assign keyboard shortcuts to elements. Inconsistencies between keyboard shortcuts and keyboard commands used by screen readers and keyboard-only users create accessibility complications so to avoid complications, access keys should not be used.
### References
diff --git a/docs/rules/no-noninteractive-element-interactions.md b/docs/rules/no-noninteractive-element-interactions.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/no-noninteractive-element-interactions.md
+++ b/docs/rules/no-noninteractive-element-interactions.md
@@ -123,5 +123,5 @@
<input type="text" onClick={() => void 0} /> // Interactive element does not require role.
<button onClick={() => void 0} className="foo" /> // button is interactive.
-<div onClick={() => void 0} role="button" aria-hidden /> // This is hidden from screenreader.
+<div onClick={() => void 0} role="button" aria-hidden /> // This is hidden from screen reader.
<Input onClick={() => void 0} type="hidden" /> // This is a higher-level DOM component
```
diff --git a/docs/rules/no-redundant-roles.md b/docs/rules/no-redundant-roles.md
index v6.10.0..v6.10.2 100644
--- a/docs/rules/no-redundant-roles.md
+++ b/docs/rules/no-redundant-roles.md
@@ -44,2 +44,3 @@
- [ARIA Spec, ARIA Adds Nothing to Default Semantics of Most HTML Elements](https://www.w3.org/TR/using-aria/#aria-does-nothing)
+- [Identifying SVG as an image](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#identifying_svg_as_an_image)
diff --git a/README.md b/README.md
index v6.10.0..v6.10.2 100644
--- a/README.md
+++ b/README.md
@@ -236,45 +236,45 @@
❌ Deprecated.
-| Name | Description | 💼 | 🚫 | ❌ |
-| :----------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | :---- | :---- | :- |
-| [accessible-emoji](docs/rules/accessible-emoji.md) | Enforce emojis are wrapped in `<span>` and provide screenreader access. | | | ❌ |
-| [alt-text](docs/rules/alt-text.md) | Enforce all elements that require alternative text have meaningful information to relay back to end user. | ☑️ 🔒 | | |
-| [anchor-ambiguous-text](docs/rules/anchor-ambiguous-text.md) | Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link". | | ☑️ | |
-| [anchor-has-content](docs/rules/anchor-has-content.md) | Enforce all anchors to contain accessible content. | ☑️ 🔒 | | |
-| [anchor-is-valid](docs/rules/anchor-is-valid.md) | Enforce all anchors are valid, navigable elements. | ☑️ 🔒 | | |
-| [aria-activedescendant-has-tabindex](docs/rules/aria-activedescendant-has-tabindex.md) | Enforce elements with aria-activedescendant are tabbable. | ☑️ 🔒 | | |
-| [aria-props](docs/rules/aria-props.md) | Enforce all `aria-*` props are valid. | ☑️ 🔒 | | |
-| [aria-proptypes](docs/rules/aria-proptypes.md) | Enforce ARIA state and property values are valid. | ☑️ 🔒 | | |
-| [aria-role](docs/rules/aria-role.md) | Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. | ☑️ 🔒 | | |
-| [aria-unsupported-elements](docs/rules/aria-unsupported-elements.md) | Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. | ☑️ 🔒 | | |
-| [autocomplete-valid](docs/rules/autocomplete-valid.md) | Enforce that autocomplete attributes are used correctly. | ☑️ 🔒 | | |
-| [click-events-have-key-events](docs/rules/click-events-have-key-events.md) | Enforce a clickable non-interactive element has at least one keyboard event listener. | ☑️ 🔒 | | |
-| [control-has-associated-label](docs/rules/control-has-associated-label.md) | Enforce that a control (an interactive element) has a text label. | | ☑️ 🔒 | |
-| [heading-has-content](docs/rules/heading-has-content.md) | Enforce heading (`h1`, `h2`, etc) elements contain accessible content. | ☑️ 🔒 | | |
-| [html-has-lang](docs/rules/html-has-lang.md) | Enforce `<html>` element has `lang` prop. | ☑️ 🔒 | | |
-| [iframe-has-title](docs/rules/iframe-has-title.md) | Enforce iframe elements have a title attribute. | ☑️ 🔒 | | |
-| [img-redundant-alt](docs/rules/img-redundant-alt.md) | Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo". | ☑️ 🔒 | | |
-| [interactive-supports-focus](docs/rules/interactive-supports-focus.md) | Enforce that elements with interactive handlers like `onClick` must be focusable. | ☑️ 🔒 | | |
-| [label-has-associated-control](docs/rules/label-has-associated-control.md) | Enforce that a `label` tag has a text label and an associated control. | ☑️ 🔒 | | |
-| [label-has-for](docs/rules/label-has-for.md) | Enforce that `<label>` elements have the `htmlFor` prop. | | ☑️ 🔒 | ❌ |
-| [lang](docs/rules/lang.md) | Enforce lang attribute has a valid value. | | | |
-| [media-has-caption](docs/rules/media-has-caption.md) | Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions. | ☑️ 🔒 | | |
-| [mouse-events-have-key-events](docs/rules/mouse-events-have-key-events.md) | Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. | ☑️ 🔒 | | |
-| [no-access-key](docs/rules/no-access-key.md) | Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader. | ☑️ 🔒 | | |
-| [no-aria-hidden-on-focusable](docs/rules/no-aria-hidden-on-focusable.md) | Disallow `aria-hidden="true"` from being set on focusable elements. | | | |
-| [no-autofocus](docs/rules/no-autofocus.md) | Enforce autoFocus prop is not used. | ☑️ 🔒 | | |
-| [no-distracting-elements](docs/rules/no-distracting-elements.md) | Enforce distracting elements are not used. | ☑️ 🔒 | | |
-| [no-interactive-element-to-noninteractive-role](docs/rules/no-interactive-element-to-noninteractive-role.md) | Interactive elements should not be assigned non-interactive roles. | ☑️ 🔒 | | |
-| [no-noninteractive-element-interactions](docs/rules/no-noninteractive-element-interactions.md) | Non-interactive elements should not be assigned mouse or keyboard event listeners. | ☑️ 🔒 | | |
-| [no-noninteractive-element-to-interactive-role](docs/rules/no-noninteractive-element-to-interactive-role.md) | Non-interactive elements should not be assigned interactive roles. | ☑️ 🔒 | | |
-| [no-noninteractive-tabindex](docs/rules/no-noninteractive-tabindex.md) | `tabIndex` should only be declared on interactive elements. | ☑️ 🔒 | | |
-| [no-onchange](docs/rules/no-onchange.md) | Enforce usage of `onBlur` over `onChange` on select menus for accessibility. | | | ❌ |
-| [no-redundant-roles](docs/rules/no-redundant-roles.md) | Enforce explicit role property is not the same as implicit/default role property on element. | ☑️ 🔒 | | |
-| [no-static-element-interactions](docs/rules/no-static-element-interactions.md) | Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute. | ☑️ 🔒 | | |
-| [prefer-tag-over-role](docs/rules/prefer-tag-over-role.md) | Enforces using semantic DOM elements over the ARIA `role` property. | | | |
-| [role-has-required-aria-props](docs/rules/role-has-required-aria-props.md) | Enforce that elements with ARIA roles must have all required attributes for that role. | ☑️ 🔒 | | |
-| [role-supports-aria-props](docs/rules/role-supports-aria-props.md) | Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. | ☑️ 🔒 | | |
-| [scope](docs/rules/scope.md) | Enforce `scope` prop is only used on `<th>` elements. | ☑️ 🔒 | | |
-| [tabindex-no-positive](docs/rules/tabindex-no-positive.md) | Enforce `tabIndex` value is not greater than zero. | ☑️ 🔒 | | |
+| Name | Description | 💼 | 🚫 | ❌ |
+| :----------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- | :---- | :---- | :- |
+| [accessible-emoji](docs/rules/accessible-emoji.md) | Enforce emojis are wrapped in `<span>` and provide screen reader access. | | | ❌ |
+| [alt-text](docs/rules/alt-text.md) | Enforce all elements that require alternative text have meaningful information to relay back to end user. | ☑️ 🔒 | | |
+| [anchor-ambiguous-text](docs/rules/anchor-ambiguous-text.md) | Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link". | | ☑️ | |
+| [anchor-has-content](docs/rules/anchor-has-content.md) | Enforce all anchors to contain accessible content. | ☑️ 🔒 | | |
+| [anchor-is-valid](docs/rules/anchor-is-valid.md) | Enforce all anchors are valid, navigable elements. | ☑️ 🔒 | | |
+| [aria-activedescendant-has-tabindex](docs/rules/aria-activedescendant-has-tabindex.md) | Enforce elements with aria-activedescendant are tabbable. | ☑️ 🔒 | | |
+| [aria-props](docs/rules/aria-props.md) | Enforce all `aria-*` props are valid. | ☑️ 🔒 | | |
+| [aria-proptypes](docs/rules/aria-proptypes.md) | Enforce ARIA state and property values are valid. | ☑️ 🔒 | | |
+| [aria-role](docs/rules/aria-role.md) | Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. | ☑️ 🔒 | | |
+| [aria-unsupported-elements](docs/rules/aria-unsupported-elements.md) | Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. | ☑️ 🔒 | | |
+| [autocomplete-valid](docs/rules/autocomplete-valid.md) | Enforce that autocomplete attributes are used correctly. | ☑️ 🔒 | | |
+| [click-events-have-key-events](docs/rules/click-events-have-key-events.md) | Enforce a clickable non-interactive element has at least one keyboard event listener. | ☑️ 🔒 | | |
+| [control-has-associated-label](docs/rules/control-has-associated-label.md) | Enforce that a control (an interactive element) has a text label. | | ☑️ 🔒 | |
+| [heading-has-content](docs/rules/heading-has-content.md) | Enforce heading (`h1`, `h2`, etc) elements contain accessible content. | ☑️ 🔒 | | |
+| [html-has-lang](docs/rules/html-has-lang.md) | Enforce `<html>` element has `lang` prop. | ☑️ 🔒 | | |
+| [iframe-has-title](docs/rules/iframe-has-title.md) | Enforce iframe elements have a title attribute. | ☑️ 🔒 | | |
+| [img-redundant-alt](docs/rules/img-redundant-alt.md) | Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo". | ☑️ 🔒 | | |
+| [interactive-supports-focus](docs/rules/interactive-supports-focus.md) | Enforce that elements with interactive handlers like `onClick` must be focusable. | ☑️ 🔒 | | |
+| [label-has-associated-control](docs/rules/label-has-associated-control.md) | Enforce that a `label` tag has a text label and an associated control. | ☑️ 🔒 | | |
+| [label-has-for](docs/rules/label-has-for.md) | Enforce that `<label>` elements have the `htmlFor` prop. | | ☑️ 🔒 | ❌ |
+| [lang](docs/rules/lang.md) | Enforce lang attribute has a valid value. | | | |
+| [media-has-caption](docs/rules/media-has-caption.md) | Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions. | ☑️ 🔒 | | |
+| [mouse-events-have-key-events](docs/rules/mouse-events-have-key-events.md) | Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. | ☑️ 🔒 | | |
+| [no-access-key](docs/rules/no-access-key.md) | Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader. | ☑️ 🔒 | | |
+| [no-aria-hidden-on-focusable](docs/rules/no-aria-hidden-on-focusable.md) | Disallow `aria-hidden="true"` from being set on focusable elements. | | | |
+| [no-autofocus](docs/rules/no-autofocus.md) | Enforce autoFocus prop is not used. | ☑️ 🔒 | | |
+| [no-distracting-elements](docs/rules/no-distracting-elements.md) | Enforce distracting elements are not used. | ☑️ 🔒 | | |
+| [no-interactive-element-to-noninteractive-role](docs/rules/no-interactive-element-to-noninteractive-role.md) | Interactive elements should not be assigned non-interactive roles. | ☑️ 🔒 | | |
+| [no-noninteractive-element-interactions](docs/rules/no-noninteractive-element-interactions.md) | Non-interactive elements should not be assigned mouse or keyboard event listeners. | ☑️ 🔒 | | |
+| [no-noninteractive-element-to-interactive-role](docs/rules/no-noninteractive-element-to-interactive-role.md) | Non-interactive elements should not be assigned interactive roles. | ☑️ 🔒 | | |
+| [no-noninteractive-tabindex](docs/rules/no-noninteractive-tabindex.md) | `tabIndex` should only be declared on interactive elements. | ☑️ 🔒 | | |
+| [no-onchange](docs/rules/no-onchange.md) | Enforce usage of `onBlur` over `onChange` on select menus for accessibility. | | | ❌ |
+| [no-redundant-roles](docs/rules/no-redundant-roles.md) | Enforce explicit role property is not the same as implicit/default role property on element. | ☑️ 🔒 | | |
+| [no-static-element-interactions](docs/rules/no-static-element-interactions.md) | Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute. | ☑️ 🔒 | | |
+| [prefer-tag-over-role](docs/rules/prefer-tag-over-role.md) | Enforces using semantic DOM elements over the ARIA `role` property. | | | |
+| [role-has-required-aria-props](docs/rules/role-has-required-aria-props.md) | Enforce that elements with ARIA roles must have all required attributes for that role. | ☑️ 🔒 | | |
+| [role-supports-aria-props](docs/rules/role-supports-aria-props.md) | Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. | ☑️ 🔒 | | |
+| [scope](docs/rules/scope.md) | Enforce `scope` prop is only used on `<th>` elements. | ☑️ 🔒 | | |
+| [tabindex-no-positive](docs/rules/tabindex-no-positive.md) | Enforce `tabIndex` value is not greater than zero. | ☑️ 🔒 | | |
<!-- end auto-generated rules list -->
Command detailsnpm diff --diff=eslint-plugin-jsx-a11y@6.10.0 --diff=eslint-plugin-jsx-a11y@6.10.2 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.11.0 and npm 10.9.0) |
github-actions
bot
deleted the
dependabot/npm_and_yarn/eslint-plugin-jsx-a11y-6.10.2
branch
November 1, 2024 03:07
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps eslint-plugin-jsx-a11y from 6.10.0 to 6.10.2.
Changelog
Sourced from eslint-plugin-jsx-a11y's changelog.
Commits
7f3d698
v6.10.20d01a1a
[meta] fix changelog URLs5dad7c4
[Dev Deps] update@babel/cli
,@babel/core
,@babel/eslint-parser
, `@babe...d15d3ab
[Refactor] avoid spreading things that are already arraysfa9845d
[patch]no-redundandant-roles
: allow\<img src="*.svg" role="img" />
daba189
[Tests]aria-role
: Add valid test for\<svg role="img" />
0bc6378
[Docs]label-has-associated-control
: add line breaks for readability30d2318
[Tests]label-has-associated-control
: add additional test casesd92446c
[Tests] Add tests to reinforce required attributes for role="heading"aa075bd
[Refactor] remove no-longer-neededes-iterator-helpers
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)