Template talk:IPA/Archive 10

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 5 Archive 8 Archive 9 Archive 10 Archive 11 Archive 12 Archive 13

Solution for IE6/7 problem

Usually, MS IE versions 6 and 7 cannot visualize the complementary IPA signs correctly. The solution would be adding the string "lang=en" to the template. See: http://www.ibloomstudios.com/articles/the_ie7_css_hack/ --TheMexican (talk) 14:24, 1 October 2007 (UTC)

Doesn't work for me, with MSIE6.
  • [ˈkæ.ɹəkˌtə(ɹ)z]
  • [ˈkæ.ɹəkˌtə(ɹ)z]
  • [ˈkæ.ɹəkˌtə(ɹ)z]
The first and third look the same in MSIE6, so there's no real need to add lang="en" in my case. --Kjoonlee 19:51, 1 October 2007 (UTC)

Well, normal simple signs will appear always correctly if you have Arial Unicode MS or Lucida Sans Unicode font installed. But try to put an IPA sign with a complementary (joint) character, like the sign for "bilabial approximant", and it will show a "beta" with an empty square (just see the table in the IPA article, there should not be empty squares). We tried the same in the Hungarian Wikipedia and it works perfectly if you complete the template with the string I suggested. --TheMexican (talk) 20:28, 1 October 2007 (UTC)

Let me see:

  • β̞ hmm strange... here it really doesn't work as well. Then maybe you should change something else, too. See hu:Sablon:IPA. --TheMexican (talk) 20:54, 1 October 2007 (UTC)

Look at also this test page, there is no squares: hu:User:El Mexicano/Teszt --TheMexican (talk) 21:01, 1 October 2007 (UTC)

I see the reason now. The English Wikipedia uses:
.IPA { font-family: foo, bar, baz;
       font-family /**/:inherit; }
But the Hungarian Wikipedia uses:
.IPA { /* IE only ( http://www.ibloomstudios.com/articles/the_ie7_css_hack/ ) */
       font-family: foo, bar, baz; }
.IPA:lang(en) { font-family: inherit; }
.IPA:empty { /* Safari */
       font-family: inherit; )
--Kjoonlee 21:03, 1 October 2007 (UTC)

Cool, so an admin should make these changes to the IPA class and there'll be no problem in IE either. :) Regards, --TheMexican (talk) 06:22, 2 October 2007 (UTC)

But it's a wrong hack. IPA can be used for all languages. The lang="en" attribute means that it's English. --Kjoonlee 09:13, 2 October 2007 (UTC)

It's the only reliable IE7 CSS hack though, and the lang attribute isn't used by anything. Usability should come before semantic correctness IMO. --Tgr 10:56, 2 October 2007 (UTC)

If usability was king, MS would fix IE7 right away so that Template:IPA would be obsolete. If the lang attribute isn't used at the moment, all the more reason to keep it safe for future use. --Kjoonlee 15:58, 2 October 2007 (UTC)
Keep safe from what? You can remove it from the template any time if screen readers start to interpret IPA codes differently depending on the language (which is rather hard to imagine, given that the whole point of IPA is to contain all pronunciation information in the characters). --Tgr 21:57, 2 October 2007 (UTC)
That's a very bad approach. You are implying that we have tested this in every single screen reader on the planet, and know that none of them uses the language tag. Obviously that's impossible, so you are simply implying that we don't care that much about a few cripples and their weirdo assistive devices.
Of course you're not implying this, but coding this way would have the same effect. Wikipedia should be the last site on the web to use such practices. Michael Z. 2007-10-03 04:53 Z
I'm not very familiar with IPA, but it should be language-independent, shouldn't it? If a screen reader transforms the IPA markup for an english and a french word differently, then that reader doesn't know what IPA is, and will get it wrong without the lang attribute too.
And it's not like there is some more sensible default the lang=en overwrites; in fact, the whole page is wrapped in a lang attribute determined by the interface language; thus if I set messages to french in my preferences, for me IPA texts will be lang=fr by default, wich is just as much incorrect. (And setting a language attribute for the whole document is a standard practice; if a defunct screen reader gets confused from that, it is pretty much useless for reading IPA anyway.)
If you want semantically correct pronunciation markup, the only way is to include it as a parameter in the IPA template, and set manually for every bit of text; but that's a lot of work for nothing.
--Tgr 08:02, 3 October 2007 (UTC)
Well, you make some valid points there. IPA is language-neutral, so on the one hand, it should not cause any problems to redundantly specify lang=en for IPA text. On the other hand, I think it's silly to pepper the code with meaningless markup, (slightly) bloating the page, to work around a bug in one browser. I'd rather see this go in the browser-specific style sheet, so the rest of us don't have to worry about why the code is there, and don't have to have it loaded in our browsers. Michael Z. 2007-10-03 08:33 Z

Or the .IPA rule could be moved from Common.css to the IE-specific stylesheets which are served in conditional comments, but I'm not sure all skins use them. --Tgr 11:09, 2 October 2007 (UTC)

Yes, please. It would be great to get these hacks out of the main style sheet. Michael Z. 2007-10-03 04:53 Z
I've checked a few skins, no two use the same file for conditional comments, and most don't have one at all. Maybe it could be loaded from Common.js with browser detection and DOM scripting; that way, slowing page loading by reading in one more style file could also be avoided. --Tgr 08:02, 3 October 2007 (UTC)

Something like this should work:

if(navigator.userAgent.indexOf("MSIE") != -1 && document.createStyleSheet) {
   document.createStyleSheet().addRule('.IPA', 'font-family: foo, bar, baz;');
}

--Tgr 08:33, 3 October 2007 (UTC)


Well, guys, whatever the solution is, while I'm seeing any empty squares in the IPA article even in my IE7 with all the unicode font sets and extra features installed, there must be something wrong. Of course we are here to help you solving the problem and not just for disturbing or forcing you to change something. Thank you for your understanding and positive collaboration. --TheMexican (talk) 17:57, 3 October 2007 (UTC)

Anyone still here? Compared to the outcry over a few disabled people maybe not being able to listen to IPA markups, you are taking the fact that daily a million or so IE 7 users can't read them rather calmly :-) --Tgr 09:51, 4 October 2007 (UTC)

We shouldn't knowingly degrade the presentation of Wikipedia for people who have adopted accessibility technologies, not even for a single one of them. Some of these are people who have more difficulty with many everyday actions including reading, and they may have spent significant effort or money to adopt technologies that help ameliorate this disadvantage. Such degradation can also affect millions of other users of various handheld and other web minority browsers.
On the other hand, IE7 users have started with a broken browser which can't properly display multilingual web pages (and I am surprised that MS hasn't fixed what was a serious known problem in IE 6). Let's do what we can to overcome the limitations of their platform, without screwing it up for anyone else. If they care about reading every character in IPA, we can suggest they find a way to use the free Firefox or other browser.
That aside, I'm not crazy about implementing what looks like a complicated hack potentially affecting other mainstream browsers. Have the declarations .IPA:lang(en) and .IPA:empty been tested in other browsers and versions? It looks like this hack depends on a bug in Safari—is that bug present in versions 1.0, 2.0 and the Safari 3.03 beta? This could further break things unpredictably in all kinds of browsers.
Let's put the IE stuff into the conditional code. Since it will work in Monobook and most other skins, it will fix the display for practically all IE users. Michael Z. 2007-10-08 21:58 Z

Yes, the code you suggested putting into my monobook.js, works perfectly. It should be put into the common configuration file. --TheMexican (talk) 21:28, 5 October 2007 (UTC)

Should be in Common.js now. IE7 users with javascript turned off will still see boxes, but whatever. --Tgr 07:29, 10 October 2007 (UTC)

I see boxes in IE7 with JavaScript enabled. Yecril (talk) 23:01, 17 May 2008 (UTC)