rtl and bdo question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan J. Flavell

    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="שבת"><bd o 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


    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
  • Jukka K. Korpela

    #2
    Re: rtl and bdo question

    "Alan J. Flavell" <flavell@mail.c ern.ch> wrote:
    [color=blue]
    > 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",[/color]
    (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.)
    [color=blue]
    > 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.[/color]

    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."


    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

    Comment

    • Alan J. Flavell

      #3
      Re: rtl and bdo question

      On Fri, Aug 1, Jukka K. Korpela inscribed on the eternal scroll:
      [color=blue]
      > "Alan J. Flavell" <flavell@mail.c ern.ch> wrote:
      >[color=green]
      > > 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.[/color]
      >
      > 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."[/color]

      accepted
      [color=blue]
      > 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[/color]

      Oh yes, I can only confirm your diagnosis, now that you put it like
      that. Thanks. I've rewritten that part of the page:


      cheers

      Comment

      • Andreas Prilop

        #4
        Re: rtl and bdo question

        "Alan J. Flavell" <flavell@mail.c ern.ch> wrote:
        [color=blue]
        > Newsgroups: netscape.public .mozilla.genera l,comp.infosyst ems.www.authoring.html[/color]

        Your article is missing at my regular newsserver.
        Perhaps because of the crossposting to the netscape.* group?
        [color=blue]
        > 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.[/color]

        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?

        Comment

        • Alan J. Flavell

          #5
          Re: rtl and bdo question

          On Fri, Aug 1, Andreas Prilop inscribed on the eternal scroll:
          [color=blue]
          > 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 "[/color]

          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

          Comment

          Working...