w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
319 stars 55 forks source link

Disabling UA transitions for same-document navigations #835

Closed khushalsagar closed 11 months ago

khushalsagar commented 1 year ago

I'm requesting a TAG review for an API to disable UA transitions for same-document navigations.

Smooth visual transitions as users navigate on the web can lower cognitive load by helping users stay in context. It can also provide a visual cue about the destination before initiating the navigation. Both site authors and user-agents (UAs) add visual transitions to their navigations for these use-cases.

However, the user experience is bad if both the site author and the UA add these transitions: the transitions may conflict and cause confusion for the user. The goal of this proposal is to avoid such cases to ensure only one visual transition is executed at a time.

Further details:

The CSSWG issue for discussing this proposal is https://github.com/w3c/csswg-drafts/issues/8747.

If an author chooses to disable UA transitions for a subset of navigations, they will need to use the API proposed at https://github.com/w3ctag/design-reviews/issues/834 to detect whether a UA transition was executed for a navigation.

We'd prefer the TAG provide feedback as (please delete all but the desired option):

💬 leave review feedback as a comment in this issue and @-notify khushalsagar.

torgo commented 11 months ago

Hi @khushalsagar we're taking a look at this today and realized there are 2 reviews that are both referencing the same explainer. Can you give a bit more context on why these are 2 separate review requests? For the disabling we're slightly concern that disabling a browser feature like this might cause user confusion. We're more positive on #834 where being able to detect the presence of a navigation animation seems fairly benign. Have you discussed this user confusion issue?

khushalsagar commented 11 months ago

Can you give a bit more context on why these are 2 separate review requests?

Sure. We found 2 separate problems with choosing between a default transition designed by the UA vs a custom transition designed by the author:

That said, I heard similar feedback against disabling any existing browser UX (like transitions on swipe gestures) that users are accustomed to at HTML WG. So this proposal needs more refinement. I can close it for now and reopen with more details. Does that sound reasonable?

Until there is a proposal here, browsers will have to be conservative about which cases have a UA transition (which overrides a site's custom transition). Since #834 will let sites detect these cases, it will be sufficient to not cause breakage because of "double transitions".

torgo commented 11 months ago

Ok thank you @khushalsagar for that reply and explanation. Much appreciated. I think it does make sense to close this for now and let's re-open when you have a refined proposal. As noted, we're happy with #834. Thanks! ✨