Add role=alert/status to error+not-found banners across details + search pages (a11y)

This commit is contained in:
2026-04-20 22:24:05 +03:00
parent 826a583c4d
commit 22d9fca5b2
3 changed files with 21 additions and 5 deletions
@@ -480,7 +480,11 @@ export const OnlineBoardDetailsPage: FC<OnlineBoardDetailsPageProps> = ({
if (error) {
return (
<PageLayout {...commonLayoutProps}>
<div className="flight-details flight-details--error" data-testid="flight-details-error">
<div
className="flight-details flight-details--error"
data-testid="flight-details-error"
role="alert"
>
<p>{t("BOARD.LOAD-FAILED")}</p>
</div>
</PageLayout>
@@ -490,7 +494,11 @@ export const OnlineBoardDetailsPage: FC<OnlineBoardDetailsPageProps> = ({
if (!displayFlight) {
return (
<PageLayout {...commonLayoutProps}>
<div className="flight-details flight-details--not-found" data-testid="flight-details-not-found">
<div
className="flight-details flight-details--not-found"
data-testid="flight-details-not-found"
role="status"
>
<p>{t("BOARD.FLIGHT-NOT-FOUND")}</p>
</div>
</PageLayout>
@@ -487,7 +487,7 @@ export const OnlineBoardSearchPage: FC<OnlineBoardSearchPageProps> = ({
{/* Error state */}
{error && (
<section className="frame" data-testid="search-error">
<section className="frame" data-testid="search-error" role="alert">
<div className="online-board-search__error-card">
<h3 className="online-board-search__error-title">
{t("BOARD.LOAD-FAILED-TITLE")}
@@ -145,7 +145,11 @@ export const ScheduleDetailsPage: FC<ScheduleDetailsPageProps> = ({
breadcrumbs={[{ label: t("SCHEDULE.TITLE"), url: scheduleHref }]}
>
<section className="frame">
<div className="schedule-details schedule-details--error" data-testid="schedule-details-error">
<div
className="schedule-details schedule-details--error"
data-testid="schedule-details-error"
role="alert"
>
<p>{t("BOARD.LOAD-FAILED")}</p>
</div>
</section>
@@ -161,7 +165,11 @@ export const ScheduleDetailsPage: FC<ScheduleDetailsPageProps> = ({
breadcrumbs={[{ label: t("SCHEDULE.TITLE"), url: scheduleHref }]}
>
<section className="frame">
<div className="schedule-details schedule-details--not-found" data-testid="schedule-details-not-found">
<div
className="schedule-details schedule-details--not-found"
data-testid="schedule-details-not-found"
role="status"
>
<p>{t("BOARD.FLIGHT-NOT-FOUND")}</p>
</div>
</section>