Accessible Buttons
summary
Walks through making real buttons accessible: uses the semantic button element not clickable divs, checks color contrast to meet contrast ratio 4.5:1 (example changes green to reach 5:1), keeps visible focus by replacing default outline with box-shadow plus an outline fallback so high-contrast Windows users still see focus, fixes icon-only buttons by adding visible text hidden with an sr-only CSS class, and handles Windows high-contrast with -ms-high-contrast and currentColor borders; notes ~4% Windows users enable high contrast.
AI-written summary · about
