W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

Re: [csswg-drafts] [cssom-view] Add ScrollIntoViewMode ("always", "if-needed"); add FocusScrollOptions (#5677)

From: hyojin via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Nov 2020 09:54:42 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-729566732-1605693281-sysbot+gh@w3.org>
> the interop difference in alignment on focus() should be fixed by browsers directly

I agree with it, but it hasn't been able to be unified for a long time, so authors need to have an option for handling it as one behavior now. Hopefully, it can be completed by https://bugzilla.mozilla.org/show_bug.cgi?id=1410112.

> I wonder if it makes sense to have a CSS property for focus alignment, which could take effect both for focus() and when the user moves focus with the Tab key.

If we define a new CSS property for focus alignment, it needs to work as `scroll-behavior` does. The scroll-behavior takes effect both cases now. (focus() method and seq. navigation by tab key) Do we have further consideration for defining the new CSS property? If it needs much works to do, it could be simply handled by FocusScrollOptions as parameters inside focus() without a new CSS property.
e.g. `scroll-alignment-[x|y]: [auto | start | end | center]`

> It's a separate dictionary from ScrollIntoViewOptions because scrollIntoView() and focus() have different default behavior (always vs. if-needed, and likely also default alignment).

If we can define the different default behaviors as a unified one in CSSOM-VIEW spec, ScrollIntoViewOptions could be used for several usages incl. focus(). If it would be difficult, I'm okay to put FocusScrollOptions separately from ScrollIntoViewOptions.

-- 
GitHub Notification of comment by anawhj
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/5677#issuecomment-729566732 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 18 November 2020 09:54:44 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC