masakudamatsu / line-height-picker

A front-end web app that helps web designers/developers pick the best line-height value for their websites
https://line-height-picker.vercel.app
MIT License
2 stars 1 forks source link

Accessibility for error messages #262

Open masakudamatsu opened 3 years ago

masakudamatsu commented 3 years ago

Add role="alert" to error message elements either

This way, screen readers will read out its text content upon error.

In doing so, remove the error message element's id from the aria-describedby attribute. Otherwise, screen readers will read out the error message twice.

Use aria-describedby only for helper text that's always shown