w3c / clreq

Requirements for Chinese Text Layout
https://www.w3.org/International/clreq/
Other
722 stars 61 forks source link

Should bars in HTML progress, meter & input=range elements be read upwards or downwards in vertical text? #500

Open r12a opened 1 year ago

r12a commented 1 year ago

Background

This question was prompted by the HTML issue at https://github.com/whatwg/html/issues/8413

Currently, Blink and WebKit don't make these inline controls vertical (see https://github.com/w3c/clreq/issues/247).

Gecko, however, does display the control vertically, but the reading direction of the progress bar when progress or meter elements are used in HTML is bottom to top. The following example and test contains Japanese text, but should work the same for Chinese.

Screenshot 2022-10-26 at 10 59 54

Test for all

Question

Is it preferable for the direction of the control to follow the direction of the surrounding text (ie. start at the top of the control), or should it always progress from bottom to top?

xfq commented 1 year ago

Related issue in jlreq: https://github.com/w3c/jlreq/issues/342

Another thread in Japanese: https://lists.w3.org/Archives/Public/public-i18n-japanese/2022OctDec/0112.html

huijing commented 1 year ago

After discussion among the members of the CLreq TF, we felt that having the controls in the same direction as the flow of the text is more intuitive. If we consider the concept of reading from thermometers and bar graphs, the direction that indicates a value is consistent with the direction which the numbers are flowing (e.g. 0, 1, 2, 3, 4) in a default direction that increases in value. Our logic is that the direction of the control and the direction of the inline text should be the same.

Ideally something like this: Screenshot 2022-11-30 at 1 53 30 PM

The label for the control translates to "Number of tickets (from 1 to 10)". It does read more intuitively if the controls were positioned as in the image.

r12a commented 1 year ago

Thanks @huijing ! So the Japanese folks prefer bottom to top, and the Chinese folks prefer top to bottom for vertical lines. That's interesting. Let's see what the CSS and browser folks make of that.

kidayasuo commented 1 year ago

Hello @xfq , probably we should jointly discuss this, with real usage examples on the table.

xfq commented 1 year ago

Discussions in the editors' call: https://www.w3.org/2022/11/29-clreq-minutes.html#t11

xfq commented 1 year ago

@kidayasuo Excellent! Would it be OK for you and the interested JL-TF members to attend the CLReq Editors' Call on December 20 (Tuesday), 20:00-21:00 (UTC+9)? Feel free to propose another time slot if it doesn't work for you.

kidayasuo commented 1 year ago

Thank you @xfq ! I am asking if some other jlreq folks can attend and will get back to you.

I believe concrete examples, either horizontal or vertical, would be a big help for a fruitful discussion. I would appreciate it if you can help collecting them. thanks!

realfish commented 1 year ago

There may be some other related issues worth being discussed here.

Should progress, meter, and input[type="range"] be discussed separately? Or, are there any different requirements between these controls/indicators as per UX or i18n/l10n.

Besides, the vertical progress is actually a universal design pattern regardless of writing mode. In other words, a vertical progress bar/indicator can appear in either the horizontal layout context or the vertical, e.g. (vertical progress indicators under horizontal-tb writing mode),

In addition, taking the writing mode into consideration, there is another related question below (which may be out of scope).

If a horizontal progress / meter / input[type="range"] appears in some vertical-rl context, should the default direction be left-to-right or right-to-left?

yisibl commented 8 months ago

One thing I'd like to mention is: please don't make a mandatory correlation between the direction of the progress bar and the direction in which the text is written. For example, I'm a Chinese user, and in vertical-rl, although the text is written from top to bottom, it doesn't necessarily mean that my progress bar has to be from top to bottom. Besides, sometimes a vertical progress bar is needed when writing horizontally.

Imagine there's a thermometer on the page 🌡 I would prefer bottom to top.

So, I would suggest adding a directional control primitive, a new HTML attribute or a CSS property, which needs to be discussed further, see https://github.com/whatwg/html/issues/4177

xfq commented 3 months ago

Discussions in the editors' call (on 29 May): https://www.w3.org/2024/05/29-clreq-minutes.html#t02