[Bug 10809] i18n comment 3 : new attribute: submitdir

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10809

Ehsan Akhgari [:ehsan] <ehsan@mozilla.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ehsan@mozilla.com

--- Comment #2 from Ehsan Akhgari [:ehsan] <ehsan@mozilla.com> 2010-09-29 23:24:32 UTC ---
(In reply to comment #1)
> Why is this needed? I.e. What problem does it solve? (keeping in mind I don't
> know much about bidi).

The rationale is explained here:
<http://www.w3.org/International/docs/html-bidi-requirements/#reporting-direction>

But here is a typical example.  Let's say I enter something like "Firefox IS A
GOOD WEB BROWSER" (where uppercase text represents text in a RTL language).  If
the direction of the textbox is ltr, this shows up like this on the screen:

Firefox ‌BROWSER WEB GOOD A IS

which is wrong.  Then, I set my user agent to switch the direction of the text
field (using Ctrl+Shift+X in Firefox, for example), which makes the text appear
like:

BROWSER WEB GOOD A IS Firefox

which is what an RTL native speaker would expect.

Now, I submit the form, and let's say that the server's job is to just generate
some HTML to display the entered value on a web page.  If the server has no way
of knowing about the direction change that I made while editing, that
information is effectively lost, and the resulting HTML will appear as below on
the screen.

Firefox ‌BROWSER WEB GOOD A IS

But with the submitdir attribute, this information will be preserved in the
form submission process, and the server can generate the correct HTML code
based on that.

> Firefox used to have various preferences which controlled how rtl text should
> be submitted, but they were largely unused by users and over time stopped
> working as originally intended. Eventually they were completely removed since
> it was unclear if they were used at all. So far no one has complained about
> their removal so it does indeed seem like they were unused. However these prefs
> were very different from what is proposed here, so it might be that the
> suggested feature is much more useful.

Those preferences were actually doing something different: they were used to
change the *encoding* of the text between encodings with logical and visual
ordering.  This is not relevant here.

> Should the submitted value be affected by CSS rules that affect the direction
> of the control?

Yes.

> What happens if the control itself has dir=ltr but only contains rtl text? 

Because @dir=ltr maps to |direction: rtl;| in CSS, submitdir should be
submitted as "ltr".  Please note that in this proposal, the actual contents of
the form control do not affect the value of submitdir.

What
> if it contains both rtl and ltr text?

Same as above.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 29 September 2010 23:24:35 UTC