From bdc815462c9351523d8b5acc570980be77eb27a5 Mon Sep 17 00:00:00 2001 From: Bassam Ismail Date: Mon, 15 Jun 2020 23:18:05 +0530 Subject: [PATCH] fix(5020): skip child content a11y check on html/textContent binding --- src/compiler/compile/nodes/Element.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 517ed3ceb6..8ca54b004b 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -706,6 +706,11 @@ export default class Element extends Node { validate_content() { if (!a11y_required_content.has(this.name)) return; + if ( + this.bindings + .map((binding) => binding.name) + .some((name) => ['textContent', 'innerHTML'].includes(name)) + ) return; if (this.children.length === 0) { this.component.warn(this, {