Create an Accessible Tooltip on a Text Input
lessonDuration 4m 32sFree
Here we use HTML and CSS to create a stylish yet semantic tooltip on a form input. I am using `aria-describedby` to create a relationship with the input and the tooltip. Then I use CSS to style the tooltip and control when it appears or disappears both on hover and focus. In this video, we use VoiceOver. To test that on a MacOS, use CMD + F5. A few resources: - [CSS Triangle](https://css-tricks.com/snippets/css/css-triangle/) - [a11y Style Guide - Tooltips](https://a11y-style-guide.com/style-guide/section-forms.html#kssref-forms-tooltips) - I used this to gut check and with some help with those transitions. - [Using VoiceOver to Evaluate Web Accessibility](https://webaim.org/articles/voiceover/)