Add aria-expanded to expandable FlightCard rows (a11y for screen readers)
This commit is contained in:
@@ -211,6 +211,7 @@ export const FlightCard: FC<FlightCardProps> = ({
|
||||
? {
|
||||
role: "button",
|
||||
tabIndex: 0,
|
||||
...(expandable ? { "aria-expanded": expanded } : {}),
|
||||
onClick: toggleExpanded,
|
||||
onKeyDown: (e: KeyboardEvent<HTMLDivElement>) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
|
||||
Reference in New Issue
Block a user