473,396 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Multiple languages in title attriibute and element content using <abbr>

Currently, I'm marking up a few pages in German, containing quite some
English abbreviations. The abbreviations are marked up as <abbr>
with the appropriate title attribute, and -- when appropriate -- I add
a "class='initialism'" to tell speach browers to spell it out
rather than to read it as one word (Ben Meadowcroft's idea).
Simple example:

<abbr title="Hypertext Markup Language" class="initialism">HTML</abbr>

Now, the point is, that I want the content of the _element_ (i.e.
"HTML") to be spelled out in German (as defined in <html lang="de">,
but the content of the title-attribute to be spoken in English. Adding
the attribute "lang='en'" to the element would, I guess, cause
"HTML" to be spelled out in English. I tried using <abbr title="..."
lang="en"><span lang="de" class="initialism">HTML</span></abbr> to
force the "HTML" to be spelled out in German, but then Opera 7 refused
to display the title-tool- tip...

Has anyone else run into this issue?

Thanks

Lars
Jul 20 '05 #1
3 4650
sv******@dbf.ddb.de (Lars G. Svensson) wrote:
Currently, I'm marking up a few pages in German, containing quite
some English abbreviations. The abbreviations are marked up as
<abbr> with the appropriate title attribute,
Why? Although <abbr> is logical in a sense, it has little support (and
clumsy support) in browsers. For example, IE 6 completely ignores it.
It can even cause some confusion, e.g. dotted line below the
abbreviation (which _might_ act as a clue on screen, but what about
printed copies?). For a discussion of <abbr>, see
http://www.cs.tut.fi/~jkorpela/html/abbr.html
and -- when
appropriate -- I add a "class='initialism'" to tell speach browers
to spell it out rather than to read it as one word
The attribute per se does not tell anything. If you intend to use it in
conjunction with a style sheet rule that suggests reading mode, stay
tuned to waiting for some years before browsers start supporting it.
Now, the point is, that I want the content of the _element_ (i.e.
"HTML") to be spelled out in German (as defined in <html
lang="de">, but the content of the title-attribute to be spoken in
English. Adding the attribute "lang='en'" to the element would, I
guess, cause "HTML" to be spelled out in English.
Well, in practice it hardly has an effect on how it is read, but in
principle, you're right: the lang attribute specifies the language of
the content _and_ all attributes of an element.
I tried using
<abbr title="..." lang="en"><span lang="de"
class="initialism">HTML</span></abbr> to force the "HTML" to be
spelled out in German,
Using extra markup seems to be the only way if you have an element and
its attributes that are in different languages. By the way, in
principle you are also saying that "initialism" is in German. :-)

Personally, I try to use - as an investment for the future*) - lang
attributes for documents as a whole and for major portions, like
quotations and titles of references works, but usually not for
individual names or things like that. It's just too much trouble,
especially in cases like yours.
*) Though I don't expect very much, and I know that lang is being
phased out in favor of xml:lang.
but then Opera 7 refused to display the
title-tool- tip...
That's odd, but it seems to be part of Opera 7's somewhat strange
implementation of tooltips (which is, on the other hand, very good in
general - it now doesn't mask out showing the URL as it used to, and
the tooltip box has a "Title: " prefix as a clue of what the browser is
showing). Consider this:
<span title="outer">foo <span title="inner">bar</span>
<span>zap</span></span>
When you mouse over the words, you get the titles that we would expect
except for the last one - for it, no tooltip appears. It seems that
Opera 7 shows the title of the innermost element, failing to show
anything if that element has no title attribute. (Luckily it has
special treatment for links, so that <a href="..." title="...">
<cite>...</cite></a> has its title shown.)
Has anyone else run into this issue?


Yep, but in theory only. It's really theoretical at present. The lang
attribute is very poorly supported. IBM Home Page Reader makes some use
of it, but browsers generally ignore it or use it incorrectly to make
guesses on _character repertoires_ (though this is not relevant when
all languages involved are written in Latin letters).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
> sv******@dbf.ddb.de (Lars G. Svensson) wrote:
Currently, I'm marking up a few pages in German, containing quite
some English abbreviations. The abbreviations are marked up as
<abbr> with the appropriate title attribute,
Why? Although <abbr> is logical in a sense, it has little support (and
clumsy support) in browsers. For example, IE 6 completely ignores it.
It can even cause some confusion, e.g. dotted line below the
abbreviation (which _might_ act as a clue on screen, but what about
printed copies?). For a discussion of <abbr>, see
http://www.cs.tut.fi/~jkorpela/html/abbr.html
and -- when
appropriate -- I add a "class='initialism'" to tell speach browers
to spell it out rather than to read it as one word


The attribute per se does not tell anything.


True, usage for it has come from my abbr vs acronym article which clearly
states the required CSS to make it "work". The class on its own has no
semantic or presentational meaning, it only affects aural presentation when
referenced in an associated style sheet, for example the follwing CSS
fragment.

abbr.initialism {speak : spell-out;}
If you intend to use it
in conjunction with a style sheet rule that suggests reading mode,
stay tuned to waiting for some years before browsers start supporting
it.


W3 and Emacspeak are not far of supporting it and also support many other
aural properties. For further reference:

Emacs W3s aural CSS support
http://www.cs.indiana.edu/elisp/w3/d..._55.html#SEC55

Emacspeak project
http://emacspeak.sourceforge.net/

--
BenM
http://www.benemadowcroft.com/
Jul 20 '05 #3
>> sv******@dbf.ddb.de (Lars G. Svensson) wrote:
Currently, I'm marking up a few pages in German, containing quite
some English abbreviations. The abbreviations are marked up as
<abbr> with the appropriate title attribute,


Why? Although <abbr> is logical in a sense, it has little support
(and clumsy support) in browsers. For example, IE 6 completely
ignores it.
It can even cause some confusion, e.g. dotted line below the
abbreviation (which _might_ act as a clue on screen, but what about
printed copies?). For a discussion of <abbr>, see
http://www.cs.tut.fi/~jkorpela/html/abbr.html
and -- when
appropriate -- I add a "class='initialism'" to tell speach browers
to spell it out rather than to read it as one word


The attribute per se does not tell anything.


True, usage for it has come from my abbr vs acronym article which
clearly states the required CSS to make it "work". The class on its
own has no semantic or presentational meaning, it only affects aural
presentation when referenced in an associated style sheet, for
example the follwing CSS fragment.

abbr.initialism {speak : spell-out;}
If you intend to use it
in conjunction with a style sheet rule that suggests reading mode,
stay tuned to waiting for some years before browsers start supporting
it.


W3 and Emacspeak are not far of supporting it and also support many
other aural properties. For further reference:

Emacs W3s aural CSS support
http://www.cs.indiana.edu/elisp/w3/d..._55.html#SEC55

Emacspeak project
http://emacspeak.sourceforge.net/


I'll also announce that I'm beginning work on a .Net based aural browser
with support for aural CSS, probably targeting the CSS 3 specification when
it gets released, although for the moment looking at CSS2 aural properties.

In fact the ".Net speech SDK V1.0 Beta 2" came through the post the other
day, http://www.benmeadowcroft.com/me/arc...html#link6th_1
however I wouldn't hold my breath for it as I am only at the design stage at
the moment and it may not get of the ground depending on the complexity,
which my initial investigations indicate seem to be quite high! (especially
with tables and the associations of <th>'s to <td>'s throwing in abbr
attributes, scopes, headers and id's, and then layering CSS on top of that!)

I should also mention that Microsoft is adding SALT support to IE,
http://www.saltforum.org/
http://www.microsoft.com/speech/evaluation/speechtags/
so although the pace of "innovation" in some areas of IE is slowing, it is
still being worked on. There is also a webcast on Microsofts TTS engine if
anyone here is interested,
http://www.microsoft.com/usa/webcasts/upcoming/2059.asp (or are you all
linux heads?)

--
BenM
http://www.benmeadowcroft.com/
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: mitch gart | last post by:
Is it possible to insert newlines, or some other character, into <title> or <alt> to get the effect of a tooltip, where the page author controls the line breaks? If yes, could somebody send an...
6
by: Matt Adams | last post by:
I want define for a couple of words inside a longer text with different font specifications. I declared it like: ....text before.... <FONT class=aaa> these text should get other attributes...
18
by: Robert Bowen | last post by:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for "less than" ("<"), the word STRONG and then the ANSI symbol for "greater than" (">") in my web page, followed by some text, then...
5
by: Derek Fountain | last post by:
I have a horizontal navigation bar, which is a single row table containing the right images. It "stretches" itself across the screen using a penultimate td like this: <td width="100%"...
29
by: Jim Moe | last post by:
Hello, I have been using <q> instead of &quot; for quoting recently. Fortunately not much has been changed since it seems IE does not know what to do with <q>! IE ignores it rather than rendering...
1
by: five of nothing | last post by:
Hi, I'm working on a page and my HTML validator whines when I try to put a <div></div> or a <table></table> inside of an <a></a> tag. What are the rules as far as what can go in there?
8
by: cms-hispano.org | last post by:
i'm building a site about extreme accessibility, i.e.: how (and why) to get sites to become fully accessible, *beyond* W3C Web Accessibility Initiative guidelines. it's far from being completed (i...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.