W3C home > Mailing lists > Public > www-validator@w3.org > May 2013

Re: [VE][html5] Add Subject Here Getting an error for using Unicode PUAs!

From: Anon SU <anonymous84327@gmail.com>
Date: Sat, 4 May 2013 03:28:44 +0700
Message-ID: <CAKHTvK0Ua=m1n30Xp-UaKxXn9abKpOMkJ2SR0FDCewq6MGf8fQ@mail.gmail.com>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: www-validator@w3.org
Thank you again for this detailed answer Yucca.

I must disagree however on what you said about icons not being characters,
as a rule. In fact, many characters are icons or "symbols" (see here:
http://www.unicode.org/charts/PDF/U2600.pdf ).

You say that icons should be represented using the <img> tag, however while
we could very well use a data attribute on the <img> tag to display the
font-icon using CSS, the drawback of that is that the <img> tag requires a
valid src attribute. That means that we'll most probably use an empty 1px
gif or png eventually for the src attribute, but you must admit that this
is another unnecessary HTTP request that could be avoided by using any
other HTML tag.

If you were referring to not using font-icons but instead using regular
images for icons, let me clarify that the enormous advantages of font-based
icons is that we're talking about vector graphics here: they are not only
much smaller in size than their image equivalents, but they are perfectly
appropriate for high-pixel-density displays (i.e. "Retina"). They can be
zoomed and will scale up like any other text without quality
loss/pixelisation. They can also be styled and animated using simple CSS.

At a time where more and more websites are delivering 2 versions of their
images through javascript or UA sniffing methods — a standard version, and
a double-sized version alternative for high-pixel-density displays
(devicePixelRatio == 2) — Choosing to use vector graphics for icons is the
smartest choice as it allows to deliver only one format for all devices.

*The main practical problem with icon fonts is that they so easily lead to
> excessive use of icons, often ugly icons.*

I don't mean to be rude at all but I believe that this is totally
irrelevant. We could say the same thing about literally *anything*. What,
we shouldn't recommend nor facilitate font-icons just because there're too
easy to use? But since you mention it: font-icons are monochromes which
means that they are much, much more sobers than what images can be, or
worse, animated gifs, should we drop support for images altogether because
people make ugly sites with them?!

Anon SU

On Sat, May 4, 2013 at 12:41 AM, Jukka K. Korpela <jkorpela@cs.tut.fi>wrote:

> 2013-05-03 20:13, Anon SU wrote:
>  The use of PUA is optional in IcoMoon, as according to their
>> documentation:
>>     /Using Latin letters is not recommended for icons fonts. *Using the
>>     Private Use Area of Unicode is the best option for icon fonts.  By
>>     using PUA characters, your icon font will be compatible with screen
>>     readers. But if you use Latin characters, the screen reader might
>>     read the single meaning less letters, which would be confusing./
> That's trickery upon trickery: They use data-icon and CSS generated
> content to add a character in the rendered content and CSS settings to
> render that character as an icon that has nothing to do with the character.
> And when they realize that some browsers might actually read the character
> as what it is (as opposite to what they try to display instead), they then
> change e.g. a Latin letter to a Private Use character. So what happens when
> some browser makes a real effort at displaying or speaking the Private Use
> character? Uttering “Private Use character U+E000” would be a reasonable
> move, and would make the page look foolish.
>  Is it a wrong usage?
> It is very, very wrong, especially since they clearly offer their
> techniques for use on WWW pages. But this is a matter of principle rather
> than a serious practical issue. (The main practical problem with icon fonts
> is that they so easily lead to excessive use of icons, often ugly icons.)
>  if so, what would you suggest as an alternative?
> Icons are not characters, as a rule. They are images, and should be
> presented in HTML using <img> tags.
>  I have customers asking me why their website gets a warning by the W3C
>> Validator, what should I tell them? that the Validator is wrong?
> A warning is seldom "wrong"; it can be useful, or useless, or sometimes
> misleading. Here it is useful, even though it is not based in HTML5 or
> Living HTML. Private Use characters *can* be used in HTML, but they *should
> not* be used as a rule, and this applies particularly strongly to open
> information interchange (as opposite to use in a standalone HTML
> application for example).
> On the other hand, the real impact of icon font trickery is relatively
> small.
> On the formal side, this is not a conformance issue, and HTML5 validation
> in general means informal and experimental checking against a mutable
> definition.
> Yucca
Received on Friday, 3 May 2013 20:29:13 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 11 February 2020 12:32:13 UTC