Add aria-expanded to accordion role=button triggers (a11y parity for filter + SearchHistory)
This commit is contained in:
@@ -297,6 +297,7 @@ export const OnlineBoardFilter: FC<OnlineBoardFilterProps> = ({
|
||||
<a
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-expanded={activeTab === "flight"}
|
||||
onClick={() => handleTabClick("flight")}
|
||||
onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") handleTabClick("flight"); }}
|
||||
>
|
||||
@@ -399,6 +400,7 @@ export const OnlineBoardFilter: FC<OnlineBoardFilterProps> = ({
|
||||
<a
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-expanded={activeTab === "route"}
|
||||
onClick={() => handleTabClick("route")}
|
||||
onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") handleTabClick("route"); }}
|
||||
>
|
||||
|
||||
@@ -72,6 +72,7 @@ export const SearchHistory: FC = () => {
|
||||
<a
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-expanded={expanded}
|
||||
onClick={toggle}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
|
||||
Reference in New Issue
Block a user