Beginner LevelHTML & Semantic Web
What is the global title attribute and what are its accessibility drawbacks?
❓ Interview Prompt: Explain global title attribute tooltips, screen reader inconsistency, and mobile touch limitations.
The global 'title' attribute adds advisory text displayed as a native hover tooltip in desktop browsers.
Accessibility Drawbacks:
1
Touch Devices: Hover tooltips fail completely on mobile smartphones and tablets.
2
Screen Readers: Inconsistently read across screen readers (often skipped by default).
3
Keyboard Users: Desktop tooltips do not appear on keyboard tab focus!
Best Practice:
Avoid relying on 'title' for critical information. Use custom accessible CSS/ARIA tooltips instead.
Code Implementation Example
html
<!-- Native tooltip (problematic on mobile and keyboard focus) -->
<button title="Deletes the selected item permanently">Delete Item</button>💡Global title attribute native hover tooltip usage.
🎯 Interview Key Takeaway
Avoid relying on the title attribute for critical info due to mobile touch and keyboard accessibility limitations.
#title attribute#Accessibility#Tooltips#Beginner
Back to all HTML & Semantic Web Questions→