473,473 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

rtl and bdo question


It's not clear to me whether the bdo tag is supposed to also influence
attribute values e.g titles on the bdo tag itself and/or on any
enclosed tags.

There have been suggestions for writing Hebrew fragments so that they
work both on older, non-rtl-supporting browsers, as also on new ones,
by coding something like this:

<bdo dir="ltr" lang="he">תבש</bdo>

and Mozilla of course displays the content as intended. However, if we
assign a title attribute to this:

<bdo dir="ltr" lang="he"
title="תבש">תבש</bdo>

the title is displayed back-to-front in the popup, evidently because
the letters have inherent rtl directionality and the bdo is having no
effect on them. The same if it's coded as:

<bdo dir="ltr" lang="he"><span
title="תבש">תבש</span></bdo>

with the attribute thoroughly enclosed within the bdo element.

Obviously, an author could respond by simply writing the title the
other way around, but one worries that it might one day be decided
that this is a bug and needs to be fixed; then it seems this would be
one sure way of authoring it:

<span title="שבת"><bdo dir="ltr"
lang="he">תבש</bdo></span>

putting the title outside of any possible bdo influence.

It says in http://www.w3.org/TR/html401/struct/...g.html#h-8.2.4
that bdo "specifies the base direction of the element's text content",
which makes it clear what's meant to happen with the marked-up text
itself. But it doesn't explicitly address what happens to text
attributes in the markup. Are we to assume that such an effect is
excluded, or is it an open question?

See this in context near the middle of this sample page
http://ppewww.ph.gla.ac.uk/~flavell/...ir-sample.html

Feel free to rate me as pedantic for bringing this up, but it came
up in a recent discussion, and I thought I'd mention it somewhere
mozilla-ish.

best regards
Jul 20 '05 #1
4 2450
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
It says in http://www.w3.org/TR/html401/struct/...g.html#h-8.2.4
that bdo "specifies the base direction of the element's text
content", (Technically, it says that the dir attribute specifies that - but the
bdo element is just a carrier for that attribute, a carrier that
changes the meaning, since in other elements, the dir attribute relates
to directionally neutral text only.)
which makes it clear what's meant to happen with the
marked-up text itself. But it doesn't explicitly address what
happens to text attributes in the markup.


I'd say it's clear that attributes are not text content. Compare the
definition with that of the lang attribute: "This attribute specifies
the base language of an element's attribute values and text content."
and, more strikingly, with the definition of dir as applied to any
other element but bdo:
"This attribute specifies the base direction of directionally neutral
text - - in an element's content and attribute values."
http://www.w3.org/TR/html4/struct/dirlang.html#adef-dir

Thus, there doesn't seem to be any way to override inherent
directionality in attribute values, if the specification is read
literally.

This is sometimes problematic, as you point out, and it might be just
an oversight - they didn't think about the possibility of visual
rendering of attribute values. It's difficult to see what problems
would be caused if the dir attribute always applied to all attributes
and all content (including attributes of nested elements) of the
element it is attached to.

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

Jul 20 '05 #2
On Fri, Aug 1, Jukka K. Korpela inscribed on the eternal scroll:
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
which makes it clear what's meant to happen with the
marked-up text itself. But it doesn't explicitly address what
happens to text attributes in the markup.
I'd say it's clear that attributes are not text content. Compare the
definition with that of the lang attribute: "This attribute specifies
the base language of an element's attribute values and text content."


accepted
and, more strikingly, with the definition of dir as applied to any
other element but bdo:
"This attribute specifies the base direction of directionally neutral
text - - in an element's content and attribute values."
http://www.w3.org/TR/html4/struct/dirlang.html#adef-dir


Oh yes, I can only confirm your diagnosis, now that you put it like
that. Thanks. I've rewritten that part of the page:
http://ppewww.ph.gla.ac.uk/~flavell/...ir-sample.html

cheers
Jul 20 '05 #3
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
Newsgroups: netscape.public.mozilla.general,comp.infosystems.www.authoring.html
Your article is missing at my regular newsserver.
Perhaps because of the crossposting to the netscape.* group?
There have been suggestions for writing Hebrew fragments so that they
work both on older, non-rtl-supporting browsers, as also on new ones,
by coding something like this:
<bdo dir="ltr" lang="he">תבש</bdo>
and Mozilla of course displays the content as intended. However, if we
assign a title attribute to this:
<bdo dir="ltr" lang="he"
title="תבש">תבש</bdo>
the title is displayed back-to-front in the popup, evidently because
the letters have inherent rtl directionality and the bdo is having no
effect on them.

Feel free to rate me as pedantic for bringing this up, but it came
up in a recent discussion, and I thought I'd mention it somewhere
mozilla-ish.


I don't regard this a pedantic as this problem shows up in other cases,
too. On http://www.unics.uni-hannover.de/nhtcapri/arabic.html6
and other pages, I wanted to include
title=" 'ayn "
with an ASCII apostrophe (') but I couldn't get it to work with both
Mozilla and Internet Explorer. With the above title, IE shows
ayn'
because the underlying text has dir="rtl" . The same happens for
title=" ‘ayn "

--
Top posting.
What's the most irritating thing on Usenet?
Jul 20 '05 #4
On Fri, Aug 1, Andreas Prilop inscribed on the eternal scroll:
I don't regard this a pedantic as this problem shows up in other cases,
too. On http://www.unics.uni-hannover.de/nhtcapri/arabic.html6
and other pages, I wanted to include
title=" 'ayn "
with an ASCII apostrophe (') but I couldn't get it to work with both
Mozilla and Internet Explorer. With the above title, IE shows
ayn'
because the underlying text has dir="rtl" . The same happens for
title=" ‘ayn "


As Jukka pointed out, though, the rtl attribute (other than in
<bdo...>) is specified to act upon the attribute values as well as on
the element content.

The issue here was specifically with that use of <bdo> to nullify the
inherent rtl property of the Hebrew. Which, as Jukka rightly spotted,
is in detail a different problem.

all the best
Jul 20 '05 #5

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

Similar topics

1
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
0
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
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...
1
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
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
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.