DEV Community

Discussion on: Everything about `<abbr>`: when to use it and how to style it in small caps

Collapse
 
masakudamatsu profile image
Masa Kudamatsu

Thank you very much for your comments, @inhuofficial !

My issue with the title attribute is that it gives a different user experience between sighted users and those screen reader users who configure it to read the title attribute value instead of text content.

Take this as an example:

<abbr title="World Health Organization">WHO</abbr>
Enter fullscreen mode Exit fullscreen mode

Sighted users don't see the title attribute value (only mouse users can see it if they dare to hover over it). They read "WHO". Screen reader users read it as "World Health Organization". The purpose of abbreviation is to take less time to understand what a phrase means. Screen readers will keep hearing a long phrase of "World Health Organization".

Using aria-label will force screen reader users to hear this expanded phrase, rather than leaving it up to their choice, because aria-label overrides text content (Watson 2017).

Is this accessibility? My gut feeling says no. Correct me if I'm wrong.

I feel that the title attribute assumes that (1) sighted users (subconsciously) read an abbreviation like WHO as "World Health Organization" every time they see it and (2) the purpose of abbreviations is to save space. But this assumption is wrong, at least for common abbreviations. It's so common to hear WHO these days so "W H O" acquires its meaning. Some people probably don't even know what it stands for (but they know what it is), just like I didn't know what AM and PM stand for.


As for small caps, do you know any hard evidence that people with dyslexia find it difficult to read, if it's used for abbreviations such as WHO? Like researchers asking people to read two versions of text, one with small caps, the other without, and comparing how quickly they understand the text.

Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

I will do you one better, I will write my next article on abbreviations, I may have led you down a rabbit hole you don't need to follow as there are much better ways to handle abbreviations and I was trying to keep my comment short(ish!).

I agree on title etc. and the issue with aria-label - it was meant to be a "this is the best option for a quick way to reach WCAG AA level". Glossaries are far more useful and following a couple of rules makes it easy (like I said I will write a whole article on it as there is a lot of explanation even though it is simple and drop you a message when it is done!).

As for small caps - I will admit it is based on general knowledge of how people with dyslexia tend to choose fonts with nearly twice as tall "large letters" such as "t, b" etc. over small letters "o, a" etc. as it tends to aid comprehension.

However I will also admit that thinking about it, the variation in fonts people prefer is large so me generalising that small caps may be confusing may not be correct. I would call it an "educated hypothesis" based on other research 😋.

Unfortunately I would imagine that research into small caps is lacking but I will have a look around!