$tags * @return array */ public static function tags(array $tags, string $context): array { $tags = parent::tags($tags, $context); if (in_array($context, ['form', 'page'], true)) { // Builder templates must stay inert and available after modal sanitization. $tags['template'] = ['class' => true, 'id' => true, 'data-*' => true]; // Shared dialogs use native form ownership and focus attributes. // Keep these generated semantics when markup passes through the product allowlist. foreach (['input', 'button', 'select', 'textarea', 'fieldset', 'output'] as $tag) { $tags[$tag]['form'] = true; $tags[$tag]['autofocus'] = true; } } return $context === 'page' ? parent::tags($tags, 'rich') : $tags; } public static function filterName(): string { return 'daytidy_kses_tags'; } }