Open
Bug 1169986
Opened 9 years ago
Updated 2 years ago
Text from attributes with dir="auto" should be displayed in the direction of the attribute, not the element
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox41 | --- | affected |
People
(Reporter: smontagu, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: rtl)
Attachments
(3 files)
3.64 KB,
patch
|
Details | Diff | Splinter Review | |
1.07 KB,
text/html
|
Details | |
1.00 KB,
patch
|
Details | Diff | Splinter Review |
HTML5 made a change in https://www.w3.org/Bugs/Public/show_bug.cgi?id=17829 to specify that "Text from attributes [that is exposed in user interfaces] is expected to be rendered in a manner that honours the directionality of the attribute.", instead of the directionality of the element as previously. This makes a practical difference in the case of elements with dir="auto", where the directionality of the element is determined by its content, but the directionality of the attribute is determined independently by *its* own content. So something like data:text/html; charset=utf-8,<p dir="auto" title="Hello!">مرحبا!</p> should be displayed with the exclamation mark on the left of the Arabic text in the body, but on the right of the English text in the tooltip. All the other attributes listed at https://html.spec.whatwg.org/multipage/dom.html#directionality-capable-attribute are also potentially affected.
Reporter | ||
Comment 1•9 years ago
|
||
This turned out a little bit more than the one-line patch I thought it would be.
Assignee: nobody → smontagu
Attachment #8633468 -
Flags: review?(jfkthame)
Reporter | ||
Comment 2•9 years ago
|
||
I doubt if there's any way to auto-test this.
Reporter | ||
Comment 3•9 years ago
|
||
Other directionality-capable attributes: abbr on th elements content on meta elements -- AFAICT we don't render these anywhere alt on area, img, and input elements label on menuitem, menu, optgroup, option, and track elements placeholder on input and textarea elements -- all these will require some special casing in DirectionalityUtils.cpp and/or html.css (in the case of alt on img this is better than calling BidiLevelFromStyle in nsImageFrame as I suggested on IRC, because we need to know the resolved direction before rendering the text so as to align it correctly)
Reporter | ||
Updated•9 years ago
|
Summary: Text from attributes should be displayed in the direction of the attribute, not the element → Text from attributes with dir="auto" should be displayed in the direction of the attribute, not the element
Reporter | ||
Comment 4•9 years ago
|
||
This is probably the simplest patch in the series, and also the most requested per dependencies
Comment 6•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: smontagu → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•