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.
accessible-emoji
1 parent 4256518 commit 7cb5b8eCopy full SHA for 7cb5b8e
src/rules/accessible-emoji.js
@@ -25,7 +25,7 @@ module.exports = {
25
26
create: context => ({
27
JSXOpeningElement: (node) => {
28
- const literalChildValue = node.parent.children.find(child => child.type === 'Literal');
+ const literalChildValue = node.parent.children.find(child => child.type === 'Literal' || child.type === 'JSXText');
29
30
if (literalChildValue && emojiRegex().test(literalChildValue.value)) {
31
const rolePropValue = getLiteralPropValue(getProp(node.attributes, 'role'));
0 commit comments