Add aria-expanded to FlightSchedule + FlightDetailsAccordion accordion triggers (a11y)
This commit is contained in:
@@ -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 === " ") {
|
||||
|
||||
Reference in New Issue
Block a user