I'm creating an HTML interface that has an input text field with a label attached. The label has a short name for the input and I want a more detailed description to appear as a popup for visual users, but also to be accessible for screen readers.
This can be done with the title
attribute, but if I attach the title to the input
element, it will only show when hovering over the input. If I attach it to the label
element, then both the label and the input can be hovered to see the tooltip.
I am wondering if this will impact screen readers somehow, and read the title out in a way that could confuse non-visual users.
Here's an example of the code:
<label title="Some extra details">
Your Input:
<input type="text" />
</label>
I haven't found any such usage in the W3 docs, but I there was one suggestion from StackOverflow. I'm just concerned it might impact accessibility.