#1253: Other Spec Review: CSS navigation-based styling

Visit on Github

Opened Aug 4, 2026

Specification

https://drafts.csswg.org/css-navigation-1

Explainer

https://github.com/WICG/declarative-partial-updates/blob/main/route-matching-explainer.md

Links

The specification

Where and by whom is the work is being done?

  • GitHub repo:https://github.com/w3c/csswg-drafts/i
  • Primary contacts: Noam Rosenthal (@noamr), Bramus Van Damme (@bramus), David Baron (@dbaron) (Google)
  • Organization/project driving the specification: Google
  • This work is being funded by: Google
  • Primary standards group developing this feature: CSSWG
  • Group intended to standardize this work: <!-- if different from the current group -->
  • Incubation and standards groups that have discussed the design: https://github.com/WICG/declarative-partial-updates

Feedback so far

  • Multi-stakeholder feedback:
    • Chromium comments: Implementing
    • Mozilla comments: TBD
    • WebKit comments: TBD
  • Major unresolved issues with or opposition to this specification:
  • Status/issue trackers for implementations: https://chromestatus.com/feature/4771962874363904

You should also know that...

No response

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

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

Discussions

Log in to see TAG-private discussions.

Comment by @matatk Aug 12, 2026 (See Github)

Hi @noamr, thank you for the review request. I note the mention of accessible alternatives in the draft note in the spec. There isn't an 'accessibility considerations' section in the explainer or spec, though. Could you let us know your thoughts on accessibility? (If you could add such a section to the spec, or explainer, that'd be great.)

Comment by @noamr Aug 13, 2026 (See Github)

Hi @noamr, thank you for the review request. I note the mention of accessible alternatives in the draft note in the spec. There isn't an 'accessibility considerations' section in the explainer or spec, though. Could you let us know your thoughts on accessibility? (If you could add such a section to the spec, or explainer, that'd be great.)

Added: https://github.com/WICG/declarative-partial-updates/blob/main/route-matching-explainer.md#accessibility-considerations

This spec is adjacent to a few a11y features/considerations such as indicating the "current link" with aria-current, or indicating "loading" with aria-busy, but we don't see atm how these should impact the spec, if at all.

If TAG or anyone else thinks that there is some oversight around a11y, we'd love to hear!

Discussed Aug 17, 2026 (See Github)

Dan: I have questions about how this works. Need more time to finish the review.

Matthew: Nothing specific I want to ask right now; am still thinking on it.

Discussed Aug 31, 2026 (See Github)

Dan: I had some surface level questions (a couple of weeks ago) that maybe we should post; I am hoping to have more time to look in more detail and maybe come up with more comments.

Matthew: We did have a back-and-forth with them regarding a11y, right?

Dan: Yes.

Matthew: One of the goals that they state is how a user interface is changing if they interact with it. I’m a bit sensitive about if the user would understand that. If the visual design has a semantic relationship, that needs to be expressed. There are other ways to understand the UI. Visual cues/structural stuff/focus management that we need. Trying to make that transition more accessible by adding more metadata doesn’t seem like the right approach. Think we should keep the momentum going. Appreciate the additions that they’ve made.

Dan: I will post what we’ve got, and then we can look at it async.

Discussed Sep 21, 2026 (See Github)

Dan: I posted some surface-level thoughts. One more-important question about cross-origin navigations. Want other thoughts, but can ask the clarifying questions. Matthew asked about accessibility, and Noam added an accessibility section. Would love your thoughts.

Matthew: I looked, and it doesn't render properly, but I think I get the gist. The spec states that the purpose of providing the transition animation is to make it easier to understand what's going on, and I'm wondering if there's anything semantic that needs to be conveyed that wouldn't be part of the structure of the page. I think there probably isn't. No major concerns or objections given their addition.

Lola: Think someone else should give this a once-or-twice-over. Not hearing volunteers. Please do look over Dan's comment.

Comment by @dandclark Sep 23, 2026 (See Github)

Thanks @noamr for posting this. I had some mostly surface-level comments/questions.

Comment by @noamr Sep 28, 2026 (See Github)

Thanks @noamr for posting this. I had some mostly surface-level comments/questions.

Thanks for the review! Are you planning to provide some more deeper opinion about the approach of providing navigation info directly to css? That would be the kind of review I was hoping for from TAG.

  • Which aspects of the feature, if any, will function for cross-origin navigations? Is this intended to be a same-origin-only feature like view transitions or are there cross-origin use cases we should be thinking about?

This feature mirrors the navigation API, which fires events also for cross origin navs.

So yes, cross origin navigation can affect styling.

A use case can be styling links to a particular origin or showing an exit animation if a cross origin navigation is initiated.

Thanks, will get that fixed!

  • Every instance of @location shown in the explainer has base-url: document. It'd be helpful to show a case where it's useful to set base-url to something else. If this is not common, maybe that should be a default rather than something that needs to be specified in every @location block.

Yes, there are ongoing discussions about how base URL should work.

Right, for now we are not specing 'with'. Cc @bramus for examples.

It felt like push/replace is not so much a styling concern but it's debatable.

  • The explainer has some formatting issues for example in https://github.com/WICG/declarative-partial-updates/blob/main/route-matching-explainer.md#link-matching and a few other places where there are literal ### which I think are meant to be subsection headers.
  • Is there a consistent way to define a @location rule that always matches "the current URL", outside of a navigation, without hardcoding any paths? That seems like it'd be useful e.g. in tandem with a:link-to so that any link that'd trigger a refresh is styled differently.

That could be a good keyword to have.