Skip to content

Commit

Permalink
DBC22-2140: added aria-labelledby attribute on button to avoid text b…
Browse files Browse the repository at this point in the history
…een cut off on Narrator

DBC22-2140: added aria-labelledby attribute on button to avoid text been cut off on Narrator
  • Loading branch information
bcgov-brwang authored and ray-oxd committed May 27, 2024
1 parent 9cfad3a commit fff0963
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/Components/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,11 @@ export default function DriveBCMap(props) {
maximizePanel(panel);
}
}}>
<span id="button-close-side-panel-label" aria-hidden="false" hidden>close side panel</span>
<button
className="close-panel"
aria-label={`${openPanel ? 'close side panel' : ''}`}
aria-labelledby="button-close-side-panel-label"
aria-hidden={`${openPanel ? false : true}`}
tabIndex={`${openPanel ? 0 : -1}`}
onClick={() => togglePanel(panel, resetClickedStates, clickedFeatureRef, updateClickedFeature)}>
Expand Down

0 comments on commit fff0963

Please sign in to comment.