#1140: `<geolocation>` element (part of PEPC)

Visit on Github.

Opened Aug 20, 2025

Specification

https://wicg.github.io/PEPC/permission-elements.html

The specification

Where and by whom is the work is being done?

  • GitHub repo: https://github.com/WICG/PEPC
  • Primary contacts:
    • Andy Paicu (@andypaicu ), Google Chrome, Lead Eng
    • Daniel Vogelheim (@otherdaniel), Google Chrome, Spec Writer
    • Minh Le (@MinhAnhL), Google Chrome, PM
  • Organization/project driving the specification: Google Chrome
  • This work is being funded by: Google Chrome
  • Primary standards group developing this feature: -
  • Group intended to standardize this work: -
  • Incubation and standards groups that have discussed the design:

Explainer

https://github.com/WICG/PEPC/blob/main/geolocation_explainer.md, https://github.com/WICG/PEPC/blob/main/explainer.md

The explainer

Feedback so far

You should also know that...

Important note: this is part of "permission" element proposal (https://github.com/w3ctag/design-reviews/issues/1079). Based on various discussions and feedback, we're proposing a split from a one-size-fits-all element to elements focused on specific capabilities. This is the proposal for a <geolocation> element. This element would inherit from the <permission> element all of its attributes, events, and checks. In the end the <permission> element would serve as a base class for the various capability-focused elements, and would no longer be usable directly.

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1140

Discussions

Log in to see TAG-private discussions.

Discussed Sep 1, 2025 (See Github)

Martin: Suggest that we encourage them to continue. Apple might have reservations about duplicative work, but this is in a good shape.

Marcos: Main concern was the duplicative aspect of this. The positive is that it lets you recover from mistakes. Deny is difficult to unwind. This allows you to get back from that gracefully. The thing was that this is less of a concern in Safari, because of different choices in prompting. It is good because it becomes a nice element, but people might continue to use other things. The surprising was the restrictions on the element, which seem arbitrary. And difficult to implement. Could be wrong. Hiding/transparency all in the document, but need to be addressed and are quite tricky because they are trying to address click-jacking. iOS has a swift element, which is meaningless, because it can be restyled into meaninglessness. Is this going to be flexible enough for developers to use. Different presentation might not lead to consistent implementation and be adapted to suit every website. My sense is that this is going to fall apart because of the competing tensions.

Martin: I also share reservations about restrictions on styling and placement.

Marcos: Starting from a form element, which is less ambitious, this could really be a thing. I can also see some tweaks to make as a geolocation API editor, but minor stuff.

Marcos/Martin to put a comment together.

Discussed Sep 8, 2025 (See Github)

Lola: Doesn't seem like anyone else brainstormed further.

Matthew: We've discussed last week but didn't make it to the issue.

Comment by @andypaicu Sep 24, 2025 (See Github)

At this point we would like to request a full TAG review for the <geolocation> element. Should I raise another issue or can this issue be adapted?

Comment by @jyasskin Sep 24, 2025 (See Github)

We can use this one, but please look through https://github.com/w3ctag/design-reviews/issues/new?template=015-other-spec-review.yaml and add any information that's not already in your original post, especially a link to your specification. It would also be ideal if a WG adopted this before we try to review the full spec. Have you proposed it to, say, WebAppSec?

Comment by @martinthomson Sep 25, 2025 (See Github)

Isn't this more appropriately in the DaS scope?

Comment by @jyasskin Sep 25, 2025 (See Github)

Isn't this more appropriately in the DaS scope?

Maybe! It kinda crosses the boundary, so the team should probably pitch it to both.

Discussed Sep 29, 2025 (See Github)

Matthew: Proponents have asked for a full TAG review. Marcos: Since Martin and Lola are not here, is anyone interested? Matthew: Marcos, anything specific you would like to add? Marcos: Worried about the duplicative nature, and the element does two roles: Permission and location updates. … Do we want these elements to have the same behavior as the Geolocation API or not? … Or should it just use the permissions? Cool thing is that they would participate in forms submission. … At the same time, also somewhat unneccessary. … Should they just be permission enabling things? … How dynamic is it? How would you style it? A bunch of things that is not yet clear. Matthew: It would be great if we collect the points that we already have consensus on. … Can you draft a comment in the private brainstorming? … And if we get that agreed during the rest of this week, we could post this? Marcos: Yes.

Comment by @marcoscaceres Oct 2, 2025 (See Github)

It's in scope of Web Apps WG jointly with DaS.

Comment by @marcoscaceres Oct 2, 2025 (See Github)

WebKit position (or at least initial questions and concerns) https://github.com/WebKit/standards-positions/issues/545

Discussed Oct 6, 2025 (See Github)

Lola: any update?

Matthew: I need more time on this.

Lola: was it discussed last week? there seems to some discussions

Matthew: yes.

Discussed Oct 13, 2025 (See Github)

Marcos: Given it's a new paradigm that we'd be introducing to the web, I see a lot of issues with how it's specified right now - it needs a bit of work. I think we should discuss it at TPAC as a general model. It doesn't add a lot of value, and the mitigations that are in place are not implementable. But the underlying model has some merit. It's whether we continue on and pursue this path or not.

Hadley: They opened this in August. Are they OK with us waiting until TPAC?

Marcos: I think they have to be - they know this is a radical proposal. it's a pretty radical shift aware from the web's permission model. It solves for re-prompting but it doesn't solve for error recovery. If I haven installed web app, and the user denies the permission. On iOS it would not be possible to re-prompt if the user goes back to it later. You can't change OS-level permissioning. So from that perspective it's not implementable, at least on Apple's platforms. Some of the other issues I already outlined in the private thread. The utiltiy of the element is limited by the need to re-prompt when the user interacts with it. Also how they're using events is a bit confusion.

Hadley: Where at TPAC are we going to discuss this?

Marcos: Possibly in the DAS and Web Apps joint meeting. I can put on my TAG hat there. That seems the most efficient way. There are larger discussions around this - this has implications for the platform. Similar for the Web Install in Web Apps.

Marcos: For accessibility the promting is similar to how it is now. But in terms of UA considerations and the wider shift in the platform that it represents, it will be an interesting discussion.

Marcos: Discussion at TPAC: https://www.w3.org/events/meetings/4a477bab-4672-4d26-a890-49420725079f/ Wednesday 13 November 2025, 09:00–12:30 Japan Standard Time

Comment by @marcoscaceres Oct 16, 2025 (See Github)

The TAG is still discussing this and we will get back to you soon. I know we plan to discuss this in the DAS/WebApps joint session at TPAC - but are there other sessions where we want to discuss this new approach of using HTML elements to enable this kind of functionality more generally (e.g., a breakout session)?

Discussed Oct 20, 2025 (See Github)

Jeffrey: Marcos posted concerns to the issue that there would be discussions at TPAC, maybe we should come back to this after TPAC.

Comment by @mikewest Oct 22, 2025 (See Github)

@marcoscaceres There should be some discussion of applying the general concept to camera/microphone in the RTC group (probably Tuesday afternoon). I expect we'll also make time for it in WebAppSec, at least insofar as the pattern relates to permissions API, permissions policy, etc. If a distinct breakout would be helpful, we can certainly arrange that as well. https://github.com/w3c/tpac2025-breakouts/issues/11 is somewhat related to the topic, though a bit tangential: carving something specific out for this pattern (and nascent extensions of it, like https://github.com/mikewest/pepc-install) might well be reasonable.

Comment by @marcoscaceres Oct 23, 2025 (See Github)

@mikewest, sounds good, but also noting that permission aspect of the proposal is only a small part of <geolocation> (probably one of the least interesting parts of the proposal): it's a wholesale replacement for the Geolocation API and adds form participation, and could set a new precedent for how we might design features for the Web declaratively.

Comment by @mikewest Oct 23, 2025 (See Github)

@marcoscaceres: Whatever the least interesting bit is, I'm glad we agree that it's interesting! Happy to chat at TPAC (I'll put together a breakout suggestion), but there's no reason we need to wait. If y'all have feedback it would be ideal to explore it together sooner rather than later to make any TPAC discussions more concrete and fruitful. :)

(I filed https://github.com/w3c/tpac2025-breakouts/issues/81 to get something on the board for TPAC; will flesh it out with more of an agenda over the next week or two.)

Comment by @andypaicu Oct 24, 2025 (See Github)

I've updated the main thread body (most importantly with a link to the spec), and changed the title.

Hopefully this counts as converting it to a regular review request.

Let me know if further information is needed.

Discussed Oct 27, 2025 (See Github)

Martin: I drafted a comment. General view is positive, worth doing. it's a direction we'd like to see them continue to explore, but there is feedback about finishing things. Jeffrey has agreed. Lola, can you look at it?

Lola: ok.

Martin: if it does, poke me and I'll post it. Am OK with others posting instead. Mark as validated.

Discussed Oct 27, 2025 (See Github)

Jeffrey: They have a specification now: https://wicg.github.io/PEPC/permission-elements.html#geolocation-element

Marcos: Overall question of using this design for powerful features.

Martin: Team wants to ensure the element is on-screen when the person gives permission. Don't think it's sufficient, and they're building it to link into IntersectionObserver. Can't be activated off-screen.

Marcos: Need to check they're re-using geolocation machinery.

Martin: Yes, they are.

Jeffrey: Marcos had mentioned that IntersectionObserver isn't fleshed out enough, and would need to be finished to be used here.

Martin: Don't think it's necessary: just the fact that you click something on the page helps a lot.

Jeffrey: UAs might need to differ here. If rejections are sticky, UA might want to be confident the user saw something in particular. But if rejections aren't sticky, UA could accept many more "clicks". Do we have opinions on how?

Marcos: Amount of variance you can do might be huge. There's generated content from the element itself. Does that count as occlusion? Occlusion, style limitations, are a very hard problem.

Jeffrey: Does it work for that to be UA-defined?

Marcos: Should be ok.

Martin: Have to implement it to be sure. What it looks like on the screen, how user interactions work in your particular thing. It won't be done until there are 3-4 implementations that each take a different path. Uncomfortable how much it integrates with the permission element.

Jeffrey: So you want it split out more so it's clear we can delete the <permission> element?

Martin+Marcos: yes.

Martin: Do think the internal state is potentially re-usable. Not sure you'd do it to start with.

Jeffrey: So we advise them to wait on that until they define at least the <usermedia> element, and probably the third instance.

Jeffrey: I can draft a comment: 1) Generally support the direction. 2) Be sure this matches other form elements. 3) Allow UAs to vary on how much they restrict style and observability. 4) Define <geolocation> as its own thing, without trying to extract out "common" parts.

Martin: How does error stuff interact with form validation?

Marcos: I looked it up a couple weeks ago; don't remember the details. If you get an error, it's not validated.

Martin: Does it have :valid and :invalid CSS?

Marcos: Yes, that'll be set as well.

Jeffrey: No point in bringing up detailed validation of particular locations until someone proposes it.

Comment by @marcoscaceres Oct 28, 2025 (See Github)

Just FYI, we plan to allocate around 2 hours to geolocation and <geolocation> as part of the joint DAS/WebAppWG meeting on Thursday morning at TPAC: https://github.com/w3c/webappswg/wiki/TPAC-2025#-thu-13-november-2025---joint-meeting-with-devices--sensors-wg

Comment by @mikewest Oct 28, 2025 (See Github)

@marcoscaceres: If we're going to have a two hour block on Thursday, then the breakout might be superfluous. Should I cancel it? I misread this as two hours on <geolocation>; it makes much more sense as two hours on geolocation generally, with some <geolocation> mixed in... The breakout on the general concept is probably still relevant. 🤪

Also, it would be helpful to structure that conversation with feedback and questions from y'all and others. Above, it sounded like the TAG was discussing/would have some questions; perhaps we could discuss some of those topics ahead of the meeting to make sure we're able to use the time to focus on the right things?