This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14850 - make unicode-bidi:isolate default for flow elements with a dir attribute too
Summary: make unicode-bidi:isolate default for flow elements with a dir attribute too
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 09:55 UTC by Aharon Lanin
Modified: 2012-05-14 19:42 UTC (History)
8 users (show)

See Also:


Attachments

Description Aharon Lanin 2011-11-17 09:55:51 UTC
The default stylesheet was changed in HTML5 (see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10815) to specify unicode-bidi:isolate for what used to be known as block elements (http://dev.w3.org/html5/spec/Overview.html#flow-content-1, http://dev.w3.org/html5/spec/Overview.html#sections-and-headings, http://dev.w3.org/html5/spec/Overview.html#lists, http://dev.w3.org/html5/spec/Overview.html#tables), instead of unicode-bidi:embed. That's fine.

On the other hand, the default stylesheet rules dealing with the dir attribute (http://dev.w3.org/html5/spec/Overview.html#bidirectional-text) specify
  [dir] { unicode-bidi: embed; }

This is fine for what used to be known as inline elements. However, as Simon Montagu recently pointed out to me, this has greater specificity than the rules for flow elements, and thus a "block" element with dir=ltr|rtl will get unicode-bidi:embed by default. This was not the intent; "block" elements should default to unicode-bidi:isolate whether they have a dir attribute or not.

One way to fix that would be to add rules explicitly covering the "block" elements with a dir attribute to the four sections listed at the top of this bug. For example, instead of having

  address, blockquote, center, div, figure, figcaption, footer, form,
      header, hr, legend, listing, p, plaintext, pre, summary, xmp {
    display: block; unicode-bidi: isolate;
  }

one could have

  address, address[dir], blockquote, blockquote[dir], center, center[dir],
      div, div[dir], figure, figure[dir], figcaption, figcaption[dir],
      footer, footer[dir], form, form[dir], header, header[dir], hr, hr[dir],
      legend, legend[dir], listing, listing[dir], p, p[dir],
      plaintext, plaintext[dir], pre, pre[dir], summary, summary[dir],
      xmp, xmp[dir] {
    display: block; unicode-bidi: isolate;
  }
Comment 1 Ian 'Hixie' Hickson 2011-12-07 22:52:36 UTC
The problem affects more than just those elements. I should move the unicode-bidi rules all into this section to make it clearer, and then add [dir] rules to everything with 'isolate' and less specificity.
Comment 2 Ian 'Hixie' Hickson 2012-01-31 01:10:05 UTC
I did it a different way in the end, but in any case the problem should be fixed now.

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 3 contributor 2012-01-31 01:11:45 UTC
Checked in as WHATWG revision r6942.
Check-in comment: The 'bidi-override:embed' rule for [dir] shouldn't take effect for block-level elements (since it overrides their 'isolate' rule).
http://html5.org/tools/web-apps-tracker?from=6941&to=6942
Comment 4 Aharon Lanin 2012-01-31 09:45:32 UTC
Thanks, that's great!