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

Keyboard Lock #182

Open
philn opened this issue May 2, 2023 · 15 comments
Open

Keyboard Lock #182

philn opened this issue May 2, 2023 · 15 comments
Assignees
Labels
concerns: accessibility There might be accessibility issues with the proposal. concerns: annoyance The technology described in this proposal could be used to do things that may annoy the user concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform concerns: compatibility This proposal may create a compatibility risk for existing sites concerns: dependencies Some of this proposal's dependencies are unstable, immature, or lack widespread support. concerns: device independence Proposal is hardware- or OS-specific, in a way that may risk the device independence of the Web concerns: integration Can't be used w/ other web platform features (or unclear what happens if used together) concerns: internationalization This proposal doesn't sufficiently account for different languages or locales concerns: portability This proposal may be impossible or difficult to implement on at least one important platform concerns: security This proposal may cause security risk if implemented from: Google Proposed, edited, or co-edited by Google. venue: WICG Proposal is incubated in the Web Incubator Community Group
Milestone

Comments

@philn
Copy link
Member

philn commented May 2, 2023

WebKittens

No response

Title of the spec

Keyboard Lock

URL to the spec

https://wicg.github.io/keyboard-lock/

URL to the spec's repository

https://github.com/wicg/keyboard-lock/

Issue Tracker URL

No response

Explainer URL

https://github.com/WICG/keyboard-lock/blob/gh-pages/explainer.md

TAG Design Review URL

No response

Mozilla standards-positions issue URL

mozilla/standards-positions#196

WebKit Bugzilla URL

No response

Radar URL

No response

Description

This spec can be useful in cloud gaming use-cases for instance. I'd like to know Apple's position about supporting this spec in WebKit.

@hober hober added venue: WICG Proposal is incubated in the Web Incubator Community Group from: Google Proposed, edited, or co-edited by Google. labels May 2, 2023
@hober hober moved this from Unscreened to Needs position in Standards Positions Review Backlog May 2, 2023
@annevk
Copy link
Contributor

annevk commented May 4, 2023

Is this being maintained? E.g., WICG/keyboard-lock#58 (something I was wondering about as well) from 2020 is still open.

@annevk annevk changed the title Keyboard: lock() Keyboard Lock May 4, 2023
@marcoscaceres marcoscaceres added concerns: compatibility This proposal may create a compatibility risk for existing sites concerns: internationalization This proposal doesn't sufficiently account for different languages or locales concerns: security This proposal may cause security risk if implemented concerns: integration Can't be used w/ other web platform features (or unclear what happens if used together) concerns: portability This proposal may be impossible or difficult to implement on at least one important platform concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform concerns: annoyance The technology described in this proposal could be used to do things that may annoy the user concerns: device independence Proposal is hardware- or OS-specific, in a way that may risk the device independence of the Web concerns: accessibility There might be accessibility issues with the proposal. concerns: dependencies Some of this proposal's dependencies are unstable, immature, or lack widespread support. labels May 5, 2023
@marcoscaceres
Copy link
Contributor

marcoscaceres commented May 8, 2023

I discussed the API colleagues and we are concerned with the overall design of the API. Although inherently tied to the Fullscreen API, the integration of the APIs is not handled as gracefully as it could be. The spec itself makes reference to this issue multiple times, suggesting to developers various ways to overcome issues (e.g., call .lock() before .requestFullscreen(), which points to design flaws in the overall design). An alternative approach with better full screen integration could be explored, as is suggested in:
WICG/keyboard-lock#58

Other concerns are normative descriptions of UI behavior, such as:

  • “...overlay a message on the screen telling the user that they can Hold the Escape key to exit from fullscreen.”
  • “If the key is held for 2 seconds....“

These kinds of normative requirements are overly prescriptive and browser/platform specific behavior. They may not be suitable depending on platform or browser conventions, which is also acknowledged by the specification (e.g., in the Mobile Device Considerations section). This again points to the overall design of API being very “desktop centric” (or, at times, it's OS/Windows centric).

The spec itself also points out a number of potential cross platform incompatibles, which, coupled with the ability for developers to specify their own key-lock combinations seems like it could lead to significant issues. Perhaps such things could be left up to the implementation to handle? In particular, specifying unconventional key locking combinations could lead to user annoyance, and unforeseen (by the developer) internationalization and accessibility issues.

@philn, what are your thoughts on it? Would be great to get your input to come up with a (WebKit) position and perhaps some feedback to send to the WICG.

@marcoscaceres marcoscaceres added this to the 2023 Week 22 milestone May 10, 2023
philn added a commit to WebPlatformForEmbedded/WPEWebKit that referenced this issue May 17, 2023
@marcoscaceres
Copy link
Contributor

Hi @philn, just pinging for an update. If we don't hear back we might mark this as "withdrawn"?

@tomayac
Copy link

tomayac commented Oct 5, 2023

It would be great to get WebKit's support for this feature, since it can make fullscreen experiences a lot better: https://developer.chrome.com/blog/better-full-screen-mode/.

@annevk
Copy link
Contributor

annevk commented Oct 5, 2023

@tomayac I think that would require someone to step up and deal with the feedback that has been given. I see I filed issues in 2017 that still haven't been resolved.

@jesup
Copy link

jesup commented Nov 4, 2023

It looks like no real work has been done (and hardly any comments) to any of the issues filed against this over 3 years ago. It has the appearance of a post-facto spec thrown over the wall after an implementation was done, and then dropped.

@philn
Copy link
Member Author

philn commented Nov 4, 2023

Hi @philn, just pinging for an update. If we don't hear back we might mark this as "withdrawn"?

Feel free to do that yes.

@xingri
Copy link

xingri commented Nov 14, 2023

@philn @marcoscaceres Per the discussion with @annevk on the last WebKit Contributors meeting,
I believe it is still worth to try implementing it based on the current spec draft under the flag.
I filed a bug for implementing this feature. (CC: @jdatapple , @stwrt)

@marcoscaceres
Copy link
Contributor

marcoscaceres commented Nov 23, 2023

Sure, but we should fix the spec in parallel too if we can. Otherwise, it may not be possible to unflag this generally given all the issues we've identified (and a lot of code and tests may need to be re-written).

@tomayac, can you check on your side if there is resourcing to collaborate on fixing the API? It's not in a good state and we collaborate on something better.

@xingri
Copy link

xingri commented Nov 27, 2023

@marcoscaceres Sure. We also think the enhancement(or clarification) in the specification is needed. We will make sure what it needs to be improved while preparing a draft implementation for the more in-depth discussion of the spec.

@marcoscaceres
Copy link
Contributor

Right, but please don't do that in isolation (we should agree on a design and see if we can get everyone on board). If we need have a call, let's set one up. I'm worried that you will end up implementing a bunch of stuff that we won't be able to land - or you'll end up shipping a design that no one is really happy with, which will confuse developers and the ecosystem.

@xingri
Copy link

xingri commented Nov 29, 2023

@marcoscaceres Sounds great! Will get back to you soon.

@marcoscaceres
Copy link
Contributor

marcoscaceres commented Nov 29, 2023

Mozilla has an interesting proposal that seems to address a lot of the concerns we raised above. I asked if they are willing to bring it over to the WICG.

Just to be clear, Mozilla proposes just having this as an option when calling .requestFullscreen(), which makes a lot of sense. It also tries to solve for the potential key combination foot guns.

It also makes the API super simple: it reduces the whole thing down to a single dictionary member, which is really elegant.

@xingri
Copy link

xingri commented Nov 29, 2023

@marcoscaceres The Mozilla proposal looks good to me but we will review internally and share the feedback.

@jrmuizel
Copy link

@marcoscaceres given WebKit/WebKit#21374 has landed does WebKit have an updated standards position?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concerns: accessibility There might be accessibility issues with the proposal. concerns: annoyance The technology described in this proposal could be used to do things that may annoy the user concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform concerns: compatibility This proposal may create a compatibility risk for existing sites concerns: dependencies Some of this proposal's dependencies are unstable, immature, or lack widespread support. concerns: device independence Proposal is hardware- or OS-specific, in a way that may risk the device independence of the Web concerns: integration Can't be used w/ other web platform features (or unclear what happens if used together) concerns: internationalization This proposal doesn't sufficiently account for different languages or locales concerns: portability This proposal may be impossible or difficult to implement on at least one important platform concerns: security This proposal may cause security risk if implemented from: Google Proposed, edited, or co-edited by Google. venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
Development

No branches or pull requests

8 participants