Add aria-expanded to FlightSchedule + FlightDetailsAccordion accordion triggers (a11y)

This commit is contained in:
2026-04-20 21:53:14 +03:00
parent 32d80332ff
commit 841099287a
2 changed files with 2 additions and 0 deletions
@@ -54,6 +54,7 @@ export const FlightSchedule: FC<FlightScheduleProps> = ({ flight }) => {
className="flight-schedule__header"
role="button"
tabIndex={0}
aria-expanded={!collapsed}
onClick={() => setCollapsed((v) => !v)}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
@@ -255,6 +255,7 @@ export const FlightDetailsAccordion: FC<FlightDetailsAccordionProps> = ({ leg, v
className={`p-accordion-header${collapsed ? "" : " p-highlight"}`}
role="button"
tabIndex={0}
aria-expanded={!collapsed}
onClick={() => setCollapsed((v) => !v)}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {