Testing long words in HTML

I've always suspected that responsive design alone could sometimes not be enough when thinking og WCAG reflow.

After reading The Ballad of Text Overflow article about WCAG success criterion 1.4.10 I decided to test some possible solutions.

Mozilla on hypens is a good starting point to check the hypens CSS solution.

So - let's set 320px width to a container with long words and check what is the problem and how to solve it;


Incomprehensibility - default CSS

Being impossible to understand - not a record breaker and should really be common enough to appear in dictionaries.

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch - default CSS

Nope, didn't make this up - Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is a large village on the island of Anglesey, Wales, United Kingdom.

Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene - default CSS

Nope, didn't make this up - Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene got a Guinness record for longest Norwegian word from 2001.

Pneumonoultramicroscopicsilicovolcanoconiosis - default CSS

Nope, didn't make this up - Pneumonoultramicroscopicsilicovolcanoconiosis is one of the longest word in English.


Incomprehensibility - word-break:break-all

Being impossible to understand - not a record breaker and should really be common enough to appear in dictionaries.

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch - word-break:break-all

Nope, didn't make this up - Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is a large village on the island of Anglesey, Wales, United Kingdom.

Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene - word-break:break-all

Nope, didn't make this up - Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene got a Guinness record for longest Norwegian word from 2001.

Pneumonoultramicroscopicsilicovolcanoconiosis - word-break:break-all

Nope, didn't make this up - Pneumonoultramicroscopicsilicovolcanoconiosis is one of the longest word in English.


Incomprehensibility - hyphens

Being impossible to understand - not a record breaker and should really be common enough to appear in dictionaries.

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch - hyphens

Nope, didn't make this up - Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is a large village on the island of Anglesey, Wales, United Kingdom.

Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene - hyphens

Nope, didn't make this up - Fylkestrafikksikkerhetsutvalgssekretariatslederfunksjonene got a Guinness record for longest Norwegian word from 2001.

Pneumonoultramicroscopicsilicovolcanoconiosis - hyphens

Nope, didn't make this up - Pneumonoultramicroscopicsilicovolcanoconiosis is one of the longest word in English.