We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c29c6c commit bc77ffbCopy full SHA for bc77ffb
src/rules/aria-role.js
@@ -7,10 +7,9 @@
7
// Rule Definition
8
// ----------------------------------------------------------------------------
9
10
-import { roles } from 'aria-query';
+import { dom, roles } from 'aria-query';
11
import { getLiteralPropValue, propName, elementType } from 'jsx-ast-utils';
12
import { generateObjSchema } from '../util/schemas';
13
-import DOMElements from '../util/attributes/DOM.json';
14
15
const errorMessage = 'Elements with ARIA roles must use a valid, non-abstract ARIA role.';
16
@@ -36,7 +35,9 @@ module.exports = {
36
35
37
if (ignoreNonDOM) {
38
const type = elementType(attribute.parent);
39
- if (!DOMElements[type]) { return; }
+ if (!dom.get(type)) {
+ return;
40
+ }
41
}
42
43
// Get prop name
0 commit comments