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 22326 - Make the dir attribute use isolation instead of embedding
Summary: Make the dir attribute use isolation instead of embedding
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Erika Doyle Navara
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: CR
Depends on:
Blocks: 23260
  Show dependency treegraph
 
Reported: 2013-06-11 13:26 UTC by Aharon Lanin
Modified: 2014-01-16 15:11 UTC (History)
7 users (show)

See Also:


Attachments

Description Aharon Lanin 2013-06-11 13:26:50 UTC
As discussed in http://www.w3.org/International/wiki/Html-bidi-isolation, the dir attribute should start using isolation instead of embedding.

There is some additional discussion in https://www.w3.org/Bugs/Public/show_bug.cgi?id=18490, but further discussion on isolation for the dir attribute should happen here.

The only change that appears to be necessary in the spec is in
http://www.w3.org/html/wg/drafts/html/master/rendering.html#bidirectional-text,
replacing all of the following:

=========
address, blockquote, center, div, figure, figcaption, footer, form,
header, hr, legend, listing, p, plaintext, pre, summary, xmp, article,
aside, h1, h2, h3, h4, h5, h6, hgroup, main, nav, section, table, caption,
colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
ol, ul, li {
  unicode-bidi: isolate;
}

:matches([dir=ltr i], [dir=rtl i], [dir=auto i]):not(address):not(blockquote
):not(center):not(div):not(figure):not(figcaption):not(footer):not(form
):not(header):not(hr):not(legend):not(listing):not(main):not(p):not(plaintext):not(pre
):not(summary):not(xmp):not(article):not(aside):not(h1):not(h2):not(h3):not(h4
):not(h5):not(h6):not(hgroup):not(nav):not(section):not(table):not(caption
):not(colgroup):not(col):not(thead):not(tbody):not(tfoot):not(tr):not(td
):not(th):not(dir):not(dd):not(dl):not(dt):not(menu):not(ol):not(ul):not(li) {
  unicode-bidi: embed;
}

bdi, bdi:matches([dir=ltr i], [dir=rtl i]),
output, output:matches([dir=ltr i], [dir=rtl i]),
[dir=auto i] {
  unicode-bidi: isolate;
}

bdo, bdo:matches([dir=ltr i], [dir=rtl i]) { unicode-bidi: bidi-override; }
bdo[dir=auto i] { unicode-bidi: isolate-override; }
=========

with the following:

=========
address, blockquote, center, div, figure, figcaption, footer, form,
header, hr, legend, listing, p, plaintext, pre, summary, xmp, article,
aside, h1, h2, h3, h4, h5, h6, hgroup, main, nav, section, table, caption,
colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
ol, ul, li,
[dir=ltr i], [dir=rtl i], [dir=auto i],
bdi, output  {
  unicode-bidi: isolate;
}

bdo, bdo[dir=ltr i], bdo[dir=rtl i] { unicode-bidi: bidi-override; }
bdo[dir=auto i] { unicode-bidi: isolate-override; }
=========

Please note that the above leaves <bdo dir="ltr|rtl"> with unicode-bidi: bidi-override instead of the new unicode-bidi: isolate-override. We could move them too to isolate-override, and it may well be cleaner, but this has not been discussed.
Comment 1 Aharon Lanin 2013-06-12 08:02:29 UTC
Come to think of it, it would be best to make a small change in the section on the dir attribute itself, http://www.w3.org/html/wg/drafts/html/master/dom.html#the-dir-attribute. At the very start, we have the following three paragraphs:

======
The ltr keyword, which maps to the ltr state
Indicates that the contents of the element are explicitly directionally embedded left-to-right text.

The rtl keyword, which maps to the rtl state
Indicates that the contents of the element are explicitly directionally embedded right-to-left text.

The auto keyword, which maps to the auto state
Indicates that the contents of the element are explicitly embedded text, but that the direction is to be determined programmatically using the contents of the element (as described below).
======

In the first two, the term "directionally embedded" would be best changed to "directionally isolated".

In the the third, "explicitly embedded" should be changed to either "directionally isolated" or "explicitly directionally isolated".
Comment 2 Aharon Lanin 2013-09-08 12:20:46 UTC
Ian, can you please clone this to WHATWG?
Comment 3 Aharon Lanin 2013-09-17 19:43:11 UTC
(In reply to Aharon Lanin from comment #2)
> Ian, can you please clone this to WHATWG?

Travis Leithead has cloned it as https://www.w3.org/Bugs/Public/show_bug.cgi?id=23260
Comment 4 Erika Doyle Navara 2013-10-11 00:38:22 UTC
Marking as HTML5 CR blocking, per request of i18n WG: http://lists.w3.org/Archives/Public/public-html-admin/2013Oct/0015.html
Comment 5 github bugzilla bot 2013-10-24 23:27:23 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/efbf692e44fa3e6b9d66a0823fc2133ff1d18f1e
[Bug 22326] Make the dir attribute use isolation instead of embedding. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=22326.
Comment 6 Erika Doyle Navara 2013-10-25 20:38:49 UTC
Change is currently under review:

http://lists.w3.org/Archives/Public/public-html/2013Oct/0113.html

If approved, it will be cherry-picked to CR branch.

Please refer to WHATWG version of this bug (bug 23260) for more technical discussion.
Comment 7 github bugzilla bot 2013-11-26 00:37:38 UTC
Commit pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/ca1986c79c26e49f7781577021b090df159c4c7a
[cgiow] (3) Change how dir='' works, from being an embedding to being an override, for better results on mixed-directionality sites. Fixes W3C HTML5 CR bug 22326: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22326

git-svn-id: http://svn.whatwg.org/webapps@8283 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit a43f5fb21c05c159be980c9567bcaa59a49308f1)
(cherry picked from commit cf3f3dbbc3a28e0b6f82d6395427c84b4bf489a8)
Comment 8 Erika Doyle Navara 2013-11-26 00:48:52 UTC
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: Folded in Ian's more comprehensive change from the WHATWG spec that updates some descriptions I missed and that additionally changes <bdo dir="ltr|rtl"> to be directionally isolated (to be unicode-bidi: isolate-override instead of unicode-bidi: bidi-override), as further requested. This keeps the behavior of dir consistent across different elements and enhances the usability of bdo under common usage. 

Rationale: See http://lists.w3.org/Archives/Public/public-html/2013Oct/0113.html for full summary.
Comment 9 Silvia Pfeiffer 2013-12-16 04:13:50 UTC
Note: I just folded in some more of Ian's changes in https://github.com/w3c/html/commit/36b26490d39317e1ad47df1ae14e9fe63b32c2dd .
Comment 10 github bugzilla bot 2013-12-19 18:20:52 UTC
Commit pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/6d8cb3ddfd7168c3784b33f67a401ffff5d8a861
[giow] (1) Move all requirements about bidi out and just rely on CSS instead. Also, fix the CSS rules for <bdo>. Follow-up changes for W3C HTML5 CR bug 22326.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23260
Affected topics: HTML, Rendering

git-svn-id: http://svn.whatwg.org/webapps@8317 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit f397c78de13607ff21d27e112e4663447672a409)
(cherry picked from commit 36b26490d39317e1ad47df1ae14e9fe63b32c2dd)
Comment 11 Erika Doyle Navara 2013-12-19 18:34:14 UTC
Thanks Silvia. Looks like you also merged the follow-up commit [1]. I went ahead and ported them both to CR branch [2][3], per discussion on public-html [4].

Aharon, if the i18n WG comes back with any particular modifications for this change as it applies to the W3C spec, feel free raise them here or public-html.

[1] https://github.com/w3c/html/commit/734a214dfdee242d3ce37d78b4a3bd94efd9630f
[2] https://github.com/w3c/html/commit/6d8cb3ddfd7168c3784b33f67a401ffff5d8a861
[3] https://github.com/w3c/html/commit/5132879fa2c2316fa48b1d1293b8f1805342aa23
[4] http://lists.w3.org/Archives/Public/public-html/2013Dec/0009.html
Comment 12 github bugzilla bot 2014-01-16 15:11:33 UTC
Commit pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/efbf692e44fa3e6b9d66a0823fc2133ff1d18f1e
[Bug 22326] Make the dir attribute use isolation instead of embedding. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=22326.