<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>145498</bug_id>
          
          <creation_ts>2015-05-31 05:05:30 -0700</creation_ts>
          <short_desc>Text from attributes should be displayed in the direction of the attribute, not the element</short_desc>
          <delta_ts>2023-06-04 21:15:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aharon (Vladimir) Lanin">aharon</reporter>
          <assigned_to name="Myles C. Maxfield">mmaxfield</assigned_to>
          <cc>7raivis</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>hppyromz</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1098400</commentid>
    <comment_count>0</comment_count>
    <who name="Aharon (Vladimir) Lanin">aharon</who>
    <bug_when>2015-05-31 05:05:30 -0700</bug_when>
    <thetext>HTML5 made a change in https://www.w3.org/Bugs/Public/show_bug.cgi?id=17829 to specify that &quot;Text from attributes [that is exposed in user interfaces] is expected to be rendered in a manner that honours the directionality of the attribute.&quot;, instead of the directionality of the element as previously.

This makes a practical difference in the case of elements with dir=&quot;auto&quot;, 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,&lt;p dir=&quot;auto&quot; title=&quot;Hello!&quot;&gt;مرحبا!&lt;/p&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959526</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-06-02 04:53:04 -0700</bug_when>
    <thetext>Chrome Canary 116 and Firefox Nightly 115 works perfectly.

While Safari 16.5 &amp; STP171 show below text on left side rather than right and with Arabic text:

Ù…Ø±Ø­Ø¨Ø§!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959804</commentid>
    <comment_count>3</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2023-06-04 21:14:50 -0700</bug_when>
    <thetext>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;p dir=&quot;auto&quot; title=&quot;Hello!&quot;&gt;مرحبا!&lt;/p&gt;
looks to be working fine in shipping Safari (both tooltip and the rendered content)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>