<?php
/**
 * The plugin's mark, as a screen's heading.
 *
 * Only the mark. The three screens that use this differ in everything else —
 * Settings carries a connection badge, Campaigns the balance and sender, Setup a
 * completeness badge — and one partial with a slot for each of those would be
 * harder to follow than three headers. The logo markup is the part that was
 * actually duplicated.
 *
 * @package TextTango
 *
 * @var array<string, mixed> $args {
 *     @type string $title This screen's name, for assistive technology.
 * }
 */

declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;
?>
<?php
/*
 * The heading stays a heading: replacing it with a bare image would take the
 * page's only level-one heading away from a screen reader.
 *
 * The name is a hidden span rather than the image's alt text, and that is the
 * whole reason this is a partial. With the name in the alt, every screen in the
 * plugin has "TextTango" as its only <h1>, so navigating by heading says nothing
 * about which one you are on. This way the visible result is the mark alone and
 * each screen still announces itself.
 */
?>
<h1 class="tt-m-0 tt-p-0">
	<img
		src="<?php echo esc_url( TEXTTANGO_URL . 'assets/admin/logo.png' ); ?>"
		alt="<?php esc_attr_e( 'TextTango', 'texttango' ); ?>"
		class="tt-h-11 tt-w-auto"
		width="248"
		height="80"
	/>
	<span class="screen-reader-text"><?php echo esc_html( (string) ( $args['title'] ?? '' ) ); ?></span>
</h1>
