You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's not great that support for the legacy keypress event is optional. It adds complexity to the specification to need to handle the chain of default actions (see #361) differently depending on whether keypress is supported or not, and if textInput (#353) is also supposed to be optional it becomes more complex still.
This complexity leaks to tests, or tests would need to be marked as "optional" if they test legacy events.
What is the benefit? As long as the events are needed for web compat, I think the spec should require support, even if it's marked as "legacy".
We still want to discourage its use, because there are accessibility issues with keypress that input has fixed. For example, speech input devices should create an input event rather have to create a sequence of keypress events appropriate for the current layout/locale. Sites that rely only on keypress would work fine for many people, but would effectively block (or require odd hacks for) users with non-standard input devices. This is why we wanted a stronger deprecation message for this event.
I don't think "legacy" is a strong enough phrasing for this since it implies that it's OK to use, but it might go away at some point. I think our position is closer to: "it's somewhat harmful to rely on this event, but we can't remove it".
https://w3c.github.io/uievents/#keypress
I think it's not great that support for the legacy
keypress
event is optional. It adds complexity to the specification to need to handle the chain of default actions (see #361) differently depending on whetherkeypress
is supported or not, and iftextInput
(#353) is also supposed to be optional it becomes more complex still.This complexity leaks to tests, or tests would need to be marked as "optional" if they test legacy events.
What is the benefit? As long as the events are needed for web compat, I think the spec should require support, even if it's marked as "legacy".
cc @masayuki-nakano
The text was updated successfully, but these errors were encountered: