Richard Ishida, W3C Aharon Lanin, Google
Extending Bidi Support on the Web
Extending Bidi Support on the Web Richard Ishida, W3C Aharon Lanin, - - PowerPoint PPT Presentation
Extending Bidi Support on the Web Richard Ishida, W3C Aharon Lanin, Google Bidi support on the Web Additional Requirements for Bidi in HTML Read the Working Draft at http://www.w3.org/International/ docs/html-bidi-requirements/ You can follow
Richard Ishida, W3C Aharon Lanin, Google
Extending Bidi Support on the Web
Additional Requirements for Bidi in HTML
Bidi support on the Web
Read the Working Draft at http://www.w3.org/International/ docs/html-bidi-requirements/ You can follow all discussions on the public-i18n-bidi@w3.org list. It's about CSS too. And some suggestions for browser developers.
Health warning!
Bidi support on the Web
This is a report on ONGOING discussions. You MUST NOT assume that these things work or will work in the future. 22 bugs were raised against HTML5 for Oct 1st, 2010 – these are currently under discussion. Additional proposals will be sent to CSS WG, and some are already being discussed and/or implemented. If you feel strongly about these features, track and join the discussion !
Outline
Bidi support on the Web
1. 1. Some b
ckgrou
2. 2. Fea eatu ture pr propos
3. 3. How How to to tr track ck devel elopmen ents/ge get i involve ved
Base direction
Background
< p> MAKE html WORK FOR YOU< /p>
LTR EKAM html UOY ROF KROW RTL UOY ROF KROW html EKAM
Base direction
Background
< p> 10 Main st.< /p>
LTR 10 Main st. RTL .10 Main st
UBA 'paragraphs'
Background
IT IS IMPORTANT TO LEARN html. (css IS IMPORTANT TOO.)
(.OOT TNATROPMI SI (css .html NRAEL OT TNATROPMI SI TI (.OOT TNATROPMI SI css)
Issue
Bidi isolation
Inlin line elem element c content o
ften n need eeds to b be e is isola lated – es espec pecia ially ly w when en data is is im impo ported in into t the e pa page ge.
Issue
Bidi isolation
Inlin line elem element c content o
ften n need eeds to b be e is isola lated – es espec pecia ially ly w when en data is is im impo ported in into t the e pa page ge.
Note
Bidi isolation
Ex Exis istin ing bidi di mar arku kup i in HTML ML i is not not designed to to solv lve t this is pr proble lem.
< span dir= rtl>תיליל</span> - 3 reviews
תיליל-3 reviews
Note
Bidi isolation
Ex Exis istin ing bidi di mar arku kup i in HTML ML i is not not designed to to solv lve t this is pr proble lem. LR LRM/RLM c can help, elp, b but it's n 's not as as good as as usi using markup kup.
< span dir= rtl>תיליל</span> - 3 reviews
תילילL
R M - 3 reviews
תיליל-3 reviews
Problems with LRM/RLM
structure of the document.
application to choose the LRM vs RLM can be difficult.
ignored during search or may be picked up in error during copy&paste, causing failures.
about unbalanced LRE/RLE/LRO/ RLO/PDF in the inserted string
Proposal
Bidi isolation
New a attrib ibute: e: ubi ubi = = of
| on/
ubi New C CSS SS val value ue un unicode-bidi di: is isola late The e res esult lt is is an em embedded U UBA A 'p 'par aragraph' t ' that at i is s treated as as a a ne neutral c cha hara racter w withi thin the the surrou round nding ng t text.
< p> < span ubi>תיליל</span> - 3 reviews< /p>
Issue
Reporting direction
Use sers c s can an sp specify dire rection for f
inp nput, t, but it it is is im immed ediately forg rgotte tten. n.
Proposal
Reporting direction
New a attrib ibute, e, subm submitdir, , on
in inpu put a and te texta tarea elem elements. Standard _dir ir s suffix ffix fo for control ntrol n name
< form action= foo method= get> < input type= text name= mytest dir= auto submitdir /> < /form> foo?mytest= texttextext&mytest_dir= ltr
Issue
dir=auto value
Somet etim imes es t the appro ropri riate te d directi tion c
ly b be e det eter ermin ined a at run un-tim ime. e.
Issue
dir=auto value
Somet etim imes es t the appropriate e dire rection c can onl n only y be deter ermin ined ed a at r run-time me.
Proposal
dir=auto value
New val value ue 'aut 'auto' f ' for d dir at attribute. New a attrib ibute: e: autod
rmetho thod=f =firs rst-strong trong | | any-rtl tl
< html autodirmethod= first-strong> … < p> Your search - < span class= booktitle dir= auto> ה צ ה ר ו ת ק י ד ו ד ת ו ו י C S S < /span> - did not match any documents.< /p>
Issue
Flipping images
Ha Handed im image ges n need eed t to be e flipp flipped d durin ing lo localiz
It is is tim ime- cons
and nd erro rror- pro rone to d to do thi
using ng sepa eparate im image files files.
Note
Flipping images
Fo For imag ages i s in <img mg> > mar arkup, y you u may ay be be abl able t to use use C CSS SS3 3 transform
tions
.myimage:rtl { transform:scaleX(-1); }
This doesn't work with images inserted using CSS.
Proposal
Flipping images
New k keyw ywords f for
CSS3 3 Images ges for t things suc s such as as bac background- imag age an and list st-style le-im image ge.
background-image: url(mygraphic.png) rtlflip;
Option 1: rtlflip, eg.
background-image: url(mygraphic.png) ltr;
Option 2: rtl | ltr, eg.
Issues
Line breaks in plain text
Browsers rs d don't c t consiste tentl ntly y trea eat lin line e brea eaks a as a UBA A 'p 'par aragraph' ' br break i in pre an and texta tare rea elem elements, as well ell as script ipt d dia ialo log t tex ext. LINE INE S SEPARA RATOR R (U (U+20 2028 28) a ) and PARAG AGRAP APH H SE SEPA PARATOR (U (U+2029 29) ) cha haracters a are re not re not recognized by by br browsers. s.
Proposal
Line breaks in plain text
No Non-collapsed lin line e brea eaks s should ld always b s break p k parag agrap aphs f s for UBA BA. LINE INE S SEPARA RATOR ( R (U+20 2028 28) ) an and PA PARAGR GRAPH PH SE SEPA PARATOR (U (U+2029 29) ) char aracters sh s shoul uld be behav ave as as defin efined in in Unic icode.
Issue
<br> as a bidi separator
HTM TML4 4 defin efines <br br> as as equi uiva valent to w to whi hite te-spa pace, b e, but mos
the ti time, a as used ed in in the e wild ild, , <br br> ne needs to to te term rminate a a UB UBA 'para ragra raph' h'. Brow rowsers d don'
do
t consiste tentl ntly. y.
< p> IT IS IMPORTANT TO LEARN html.< br> (css IS IMPORTANT TOO.)< /p>
(.OOT TNATROPMI SI (css .html NRAEL OT TNATROPMI SI TI (.OOT TNATROPMI SI css)
Note
<br> as a bidi separator
Usi sing m mar arku kup pr properly ly is is the e bes est so solut ution, but but it may ay be e unrea ealis istic ic t to expect tha that to t to ha happen.
< body g_editable= "true" hidefocus= "true" class= "editable LW-yrriRe" id= ":6y" style= ""> IT IS IMPORTANT TO LEARN html.< br> (css IS IMPORTANT TOO.)< br> …
Proposals
<br> as a bidi separator
Add a a new at attribut ute: bidibr break ak=har ard|so |soft. Valu lue is is in inher erit ited b by <br br> e > elements nts. The he default f for
the root root element i is s 'h 'har ard'. '. Val alue ue 'so 'soft' c ' coul uld p provide control ntrol f for except eptio ions/lega legacy. .
< html bidibreak= soft lang= he>
.html NRAEL OT TNATROPMI SI TI (.OOT TNATROPMI SI css)
Issue
Script dialog text direction
Brow rowsers a are re incons
tent i nt in the dir irec ection t they ey a appl pply to dialo log t g text. Us Using Uni Unicode control ntrols c can be probl blemat atic.
Proposal
Script dialog text direction
Tex ext pa passed ed t to dia ialo log control ntrols w withou hout t ex expli plicit it d dir irec ection should ld b be e dis ispla played according to to the the first s t strong
chara racte ter i r in each 'para ragra raph' h'.
Issue
<title> should support the dir attribute
Brow rowsers d don'
use dire rectional inf nformation f from rom the the p page to to display <ti <titl tle> te text c t corre
y.
< html dir= rtl> < head> < title> EGYPT ISRAEL deutschland france< /title> …
Proposal
<title> should support the dir attribute
The e HT HTML s L spec pecif ific ication s should ld sti tipulate tha that ti t titl tle te text b t be displayed i in n the the <ti <titl tle> element' nt's c compute ted d directi tion.
< html dir= rtl> < head> < title> EGYPT ISRAEL deutschland france< /title> …
Issue
title and alt attribute text direction
It sh shoul uld be be possi ssible t to have ave diffe ifferent b base d e dir irec ections fo for a an elem element's c content v vs. . it its alt lt or ti titl tle a attri ttributes.
Issue
title and alt attribute text direction
It sh shoul uld be be possi ssible t to have ave diffe ifferent b base d e dir irec ections fo for a an elem element's c content v vs. . it its alt lt or ti titl tle a attri ttributes.
Proposal
title and alt attribute text direction
New a attrib ibute: e: titled edir ir=ltr| tr|rtl rtl|auto to. New a attrib ibute: e: altdir ir=ltr| tr|rtl rtl|auto to Spec to to sta tate te tha that a alt t and nd ti titl tle te text t
take on
the base d dire rection of
the the c cont
Issue
<option> and text direction
Mos Most b brow rowsers d don’
take i into a nto accou
a dir r attr ttribute on
n <op <option> e
The he one
that d does es d does esn’t a apply pply it it aft fter er t the e opt ption has as be been c chose sen. Als Also it it let lets the e <option>’s d dir ir affec ffect it its alignment, ra rathe ther tha than ta n taking the the alig lignment fr from t the e dir irec ection o
f the e <select> e t> element. nt.
< select> < option value= 1> deutschland< /option> < option value= 2> france< /option> < option value= 3 dir= rtl> TPYGE (egypt)< /option> < option value= 4 dir= rtl> LEARSI (israel)< /option> < /select>
Proposal
<option> and text direction
The he com
dire rection of
n <option> elem element will ill take in e into account a any ny dir r attri ttribute, a and nd it t will b ill be a e appli pplied to it its content both in in the e dropd pdown a and aft fter er b bein eing chos hosen.
Issue
List item rendering
Bul ullets an s and number erin ing a g are not d dis ispla played as ex expec pected, n nor consiste tent ntly y acros ross brow
rs.
Default With text-align
Proposal
List item rendering
Bul ullets an s and number erin ing g sh should al alway ays s fo foll llow t the e dire rection s set on t on the the < <ol
<ul ul> e > element. nt. By defa efault lt, li list text sh shoul uld be be align gned ed accord
ng t to directi tion. n.
Default With text-align
Other topics
should support interoperable ‘set direction’ functionality
should be on the ‘end’ side relative to the user agent chrome direction
below <body> should be on the ‘end’ side relative to the element’s direction
Getting involved
Read the document: http://www.w3.org/International/docs/html-bidi-requirements/ Follow/contribute to the discussions: http://lists.w3.org/Archives/Public/public-i18n-bidi/ Track HTML5 bugs: http://www.w3.org/International/reviews/html5-bidi/