473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ALT for text?

On my computer
/usr/share/doc/w3-recs/RECS/html4/struct/objects.html#adef-alt
says one can use ALT= for images, but how about for text: if they
can't see the Chinese character, give them the romanization of it.
Or must one produce a .GIF to enjoy this, instead of putting the raw
character (2 or 3 bytes) into the page?

Feb 9 '06 #1
6 1628
On Fri, 10 Feb 2006, Dan Jacobson wrote:
On my computer
/usr/share/doc/w3-recs/RECS/html4/struct/objects.html#adef-alt
says one can use ALT= for images, but how about for text:
That's easy: ALT= is for *alternative* text, when the images can't be
seen. If you want to provide *supplementary* information, that's what
the title= attribute is for.
if they can't see the Chinese character,
Well, we can *see* them, even if we can't read them. Assuming we've
installed an adequate range of fonts, anyway.
give them the romanization of it.
<span lang="whatever" title="some romanised text">some chinese
text</span>

You'd probably want to style it somehow, to alert the reader to the
possibility of supplementary information.

Not that it would make much difference! I remember two colleagues
whose spoken Chinese was mutually unintelligible, holding a
conversation by writing Chinese on the table napkins at lunch.
Or must one produce a .GIF to enjoy this, instead of putting the raw
character (2 or 3 bytes) into the page?


Oh no, at least not in theory; but the average browser's provision for
viewing the title= value could be rated as less than ideal for this
situation.

good luck

--

Most folks would think a Referer header is something you smoke.
-- Bruce Tomlin in a.s.r
Feb 9 '06 #2
Alan J. Flavell wrote:
if they can't see the Chinese character,
Well, we can *see* them, even if we can't read them.


Or maybe not. We might be using a speech synthesizer or a Braille device
that does not grok Chinese characters but could render a transcription
in Latin letters at least by presenting the letters. Or...
Assuming we've
installed an adequate range of fonts, anyway.
The assumption often fails. Maybe the system just hasn't got a font with
Chinese characters. Besides, no existing font is sufficient for
rendering _all_ Chinese characters. Even if someone created a font with
all characters that exist in Unicode at present, they keep adding new
characters to Unicode.
<span lang="whatever" title="some romanised text">some chinese
text</span>

You'd probably want to style it somehow, to alert the reader to the
possibility of supplementary information.


Or maybe even explicitly describe this feature, even though it means
discussing the techniques - without knowing whether they work for the
user, so the text should be sufficiently conditional.

It occurred to me that we might use Ruby markup in cases like this. When
supported, the ruby annotation would appear above the annotated text,
and you could additionally use title="..." (because the annotation
appears by default in so small print that it is difficult to read).

Ruby markup is supported to a limited degree by IE 6. See some tests at
http://www.cs.tut.fi/~jkorpela/html/ruby.html
(I didn't find a way to make the annotation text appear closer to the
annotated text. The effect on line length is now rather disturbing.)
Feb 10 '06 #3
On Thu, 9 Feb 2006, Alan J. Flavell wrote:
<span lang="whatever" title="some romanised text">some chinese
text</span>
You'd probably want to style it somehow, to alert the reader to the
possibility of supplementary information.


Or write DFN instead of semantic-free SPAN since romanized text
may be considered some sort of definition.

--
All free men, wherever they may live, are citizens of Denmark.
And therefore, as a free man, I take pride in the words "Jeg er dansker!"

Feb 10 '06 #4
On Fri, 10 Feb 2006, Jukka K. Korpela wrote:
Assuming we've installed an adequate range of fonts, anyway.
The assumption often fails. Maybe the system just hasn't got a font
with Chinese characters. Besides, no existing font is sufficient for
rendering _all_ Chinese characters.


I noticed, when I'm using linux Mozilla, that when it hasn't got a
glyph to display, it displays a box with the Unicode character number
in it (which could then be looked-up in the Unicode specification...)
It occurred to me that we might use Ruby markup in cases like this.


Right - it does seem to be meant for just this kind of purpose.

http://www.w3.org/International/tutorials/ruby/

(If anyone's confused about this - this is *not* about the
program scripting language called Ruby).

I've made no secret of the fact that I know very little about CJK
writing systems, so I hadn't looked much at ruby. But prompted by
your example, I've taken a look and it does seem rather good.

(Are we allowed to use this to annotate English-language document with
English-language annotations? Just a throwaway thought...)

As they rightly say, it's not valid in HTML/4 nor XHTML/1.0, so it's
stretching things a bit to include it in current documents; but it's
been designed for graceful fallback, and seems indeed to behave well,
despite making the document fail validation.

I suppose you wouldn't care to make it technically valid by using
XHTML/1.1 (and, for obvious reasons, deciding not to follow the W3C's
"SHOULD" about not serving it as text/html) ?

If I try to view the W3C's XHTML/1.1 test
http://www.w3.org/International/test...-markup-1.html
in IE6, I get an alert telling me "Your current security settings do
not allow this file to be downloaded." ;-)

I couldn't resist trying the Mozilla extension mentioned at W3C,
namely http://piro.sakura.ne.jp/xul/_rubysupport.html.en

And indeed it seems to work with your document.

cheers
Feb 10 '06 #5
Jukka K. Korpela wrote:
Alan J. Flavell wrote:
if they can't see the Chinese character,
Well, we can *see* them, even if we can't read them.


Or maybe not. We might be using a speech synthesizer or a Braille device
that does not grok Chinese characters but could render a transcription
in Latin letters at least by presenting the letters. Or...


Isn't the bottom line that the browser sees text data, subjects it to
whatever algorithm it uses for displaying such, and ultimately doesn't
really know whether what it's showing the user is legible text or not?
If that's correct, then the browser won't know when to show alternative
content.
Assuming we've installed an adequate range of fonts, anyway.


The assumption often fails. Maybe the system just hasn't got a font with
Chinese characters. Besides, no existing font is sufficient for
rendering _all_ Chinese characters.


I'm picturing a situation where a browser would render those Chinese
characters that it could AND would show pinyin for those characters that
it couldn't render. What a mess!
Feb 10 '06 #6
On Fri, 10 Feb 2006, Alan J. Flavell wrote:
If I try to view the W3C's XHTML/1.1 test
http://www.w3.org/International/test...-markup-1.html [...]
I couldn't resist trying the Mozilla extension mentioned at W3C,
namely http://piro.sakura.ne.jp/xul/_rubysupport.html.en


Just a word of warning about this - it seemed to have wrecked
Mozilla's PDF plugin. Every subsequent attempt to view a PDF file had
got me a hung instance of Acrobat Reader, and had also hung all my
Mozilla windows until I brutally killed the Acrobat Reader process.

After de-installing the Ruby plug-in, PDF viewing is working again
without problems. Well, the author /does/ have a disclaimer,
http://piro.sakura.ne.jp/xul/_rubysu...ml.en#problems ,
so I've no cause to grumble, but I thought that - having posted
the above mention - I'd better add this caveat.

cheers
Feb 11 '06 #7

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

Similar topics

1
4131
by: joes | last post by:
Hello there ! I rendering a PDF with XSLT using Xalan and FOP. I like to place in my article an image, so that the text is floating around the image. I tried several things but it didn't work so...
3
22992
by: Xerxes | last post by:
Hi, I need help in setting up a page where the text wraps around an image. Right now, I am using table, with text in one <td> and the image in the adjacent <td>. The problem is when the text is...
2
7557
by: Macsicarr | last post by:
Hi All Wonder if you could help me. I have created a CMS system that allows the user to enter text and pic 'tags' for their own About us page, eg text.... text.... text.... text.......
2
2248
by: Jiri Palecek | last post by:
I have a question on web authoring (probably HTML+CSS). Is it somehow possible to put two words above each other inside a paragraph so the result would be valid and render at least in Mozilla? I...
4
2583
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
3
2552
by: jweinberg1975 | last post by:
I would like for users to be able to select from a small number of options that come from a little drop down menu which then closes. .....
3
2147
by: bbepristis | last post by:
Hey all I have this code that reads from one text file writes to another unless im on a certian line then it writes the new data however it only seems to do about 40 lines then quits and I cant...
3
3962
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
3
2568
by: jonniethecodeprince | last post by:
Hi all, I have trouble getting an array of data stored in a separate javascript file i.e. a file called books.js into a table of data for a .xhtml file. There are 50 Records in this file....
10
3157
by: bluemountain | last post by:
Hi there, Iam new to python forms and programming too I had a text file where i need to extract few words of data from the header(which is of 3 lines) and search for the keyword TEXT1, TEXT2,...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
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
7160
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
7196
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
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.