Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify arrow key behavior for <input type=number> in vertical writing mode #9846

Closed
dizhang168 opened this issue Oct 9, 2023 · 4 comments
Closed

Comments

@dizhang168
Copy link
Contributor

What is the issue with the HTML Standard?

When is vertical writing-mode, it is not specced [1] what should be the arrow key behavior.
For horizontal-tb writing-mode:

  • Key left should move caret position to the prev digit
  • Key right should move caret position to the next digit
  • Key down should step down the value (decrease)
  • Key up should step up the value (increase)
  • 2 arrow keys are up/down

For vertical-rl and vertical-lr, should we keep A) same behavior as horizontal
OR
B) Change to:

  • Key down should move caret position to the next digit
  • Key up should move caret position to the prev digit
  • Key left should step down the value (decrease)
  • Key right should step up the value (increase)

Further, for the rendered spin arrow buttons, should we
A) Keep 2 arrow keys as up/down
B) Change to 2 arrow keys as left/right

[1] https://drafts.csswg.org/css-writing-modes-3/#text-baselines

@domenic
Copy link
Member

domenic commented Oct 10, 2023

The HTML Standard does not generally specify the UI details of controls, as that is up to a user agent. For example, the fact that some user agents use spinner buttons is entirely their choice; you could also have a variety of other interfaces. (And, on different devices, you often do see other interfaces.)

So, I don't think this is really within the scope of the HTML Standard.

@annevk
Copy link
Member

annevk commented Oct 10, 2023

Agreed, though I can't find anything in the specification with respect to vertical rendering. How did that end up being part of Interop 2023 to begin with? @zcorpan do you know?

We also still have #4177.

@dizhang168
Copy link
Contributor Author

I see, thank you for the explanation. Note there is also issue #8413. It would be beneficial to have some interoperability on these controls' UI, although I understand historically we have avoided to do that.

@zcorpan
Copy link
Member

zcorpan commented Oct 11, 2023

Agreed, though I can't find anything in the specification with respect to vertical rendering. How did that end up being part of Interop 2023 to begin with? @zcorpan do you know?

I'm not sure. It wasn't part of @josepharhar original test list AFAICT, and per @foolip in web-platform-tests/interop#119 (comment) only Grid and Flexbox increased the scope from 2022 to 2023, yet the .optional tests were added in web-platform-tests/wpt-metadata@bc63a7b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants