import { _ as y, l as A, v as u } from "./vendor-preact-DThS2ZQ_.js";
import { t as Title } from "./typography-BZIpjo97.js";
//#region src/shared/autoFocusTitle/autoFocusTitle.tsx
/**
* `<h2>` heading that moves focus to itself on mount.
*
* Use when a screen or sub-section has a heading rendered mid-content
* (i.e. not via `Page`'s `title` prop) and you still need keyboard /
* screen-reader users to land on it. Fulfills WCAG SC 2.4.3 Focus Order
* for in-page transitions where the heading is the natural starting
* point.
*
* For page-level headings, prefer `Page`'s `title` prop — it does the
* same thing, plus provides the `<main>` landmark and visual layout.
*/
var AutoFocusTitle = ({ children, className }) => {
	const ref = A(null);
	y(() => {
		ref.current?.focus();
	}, []);
	return /* @__PURE__ */ u(Title, {
		ref,
		tabIndex: -1,
		className,
		children
	});
};
//#endregion
export { AutoFocusTitle as t };
