Använd abbr-elementet för förkortningar, men skippa title-attributet
Kort och träffsäkert om hantering av förkortningar, akronymer och numeronymer:
- The
title
attribute content is only practically available to mouse users.- The
title
attribute display for mouse users with low vision is problematic, to say the least.- The
title
attribute content is available to users of JAWS and NVDA screen reader users if they enable it, by default it’s ignored.- VoiceOver simply does not announce the
title
attribute content on\<abbr\>
- No amount of clever tricks with ARIA, CSS and JavaScript will make it not suck.
Lösningen är kort och gott att falla tillbaka på traditionella skrivmetoden: att alltid skriva ut den långa betydelsen i en parantes första gången förkortningen förekommer, och därefter skippa det.
title
-attributet kan fortsätta användas som en nice to have för att berika muspekarinteraktioner, men det är en otillräcklig lösning för tillgänglighet.
Följande CSS-snippet kommer aldrig att anses dålig, men däremot överflödig:
abbr[title] {
cursor: help;
}