ElytraSwimFix
A client-side Fabric mod that prevents the Elytra from activating while underwater.

How ElytraSwimFix Changes Underwater Movement
ElytraSwimFix stops the elytra from deploying while a player is underwater. This modification directly addresses the game bug tracked under the identifier MC-260440. By blocking unintended wing activation beneath the water surface, players can swim normally without accidentally entering the gliding state.
The restriction is temporarily bypassed whenever the player holds a firework. When a firework item is in hand, the modification will not block the wings from opening. This specific exception allows players to still initiate underwater flight if they deliberately equip a rocket.
Requirements and Multiplayer Compatibility
Running this modification requires both the Fabric Loader and the Fabric API. Both the loader environment and the API dependency must be present in the game setup for the underwater gliding fix to function properly. Once active, the behavioral change applies automatically during gameplay without any extra commands or configuration.
Starting from release 26.1.0, ElytraSwimFix operates purely on the client side. Earlier builds required the modification to be present on the server as well for multiplayer sessions. With the 26.1.0 update and newer, having it on the local client is sufficient to stop underwater wing deployment on any multiplayer server.
Questions
What does ElytraSwimFix change about the elytra?
It blocks your elytra from deploying while you are submerged in water, fixing bug MC-260440.
Why did my elytra still open underwater with the mod active?
The modification disables its blocking behavior whenever you are holding a firework in your hand.
Does ElytraSwimFix need to be on the server for multiplayer?
No, starting with release 26.1.0 it works purely on the client side and does not need to be added to the server.
What dependencies are required to run this mod?
You must have both the Fabric Loader and the Fabric API.
Related

A library mod and API that exposes vanilla elytra flight mechanics as an entity attribute for developers.

Overhauls elytra flight controls and camera movement with full pitch, yaw, and roll mechanics.

Adds craftable hang gliders with wind mechanics and upgradeable speed for gliding through the skies.

Adds a craftable hang glider with wind physics as an early-game scenic flight alternative to the elytra.

Allows players to take off with an elytra from the ground using a firework rocket without jumping.

A client-side camera mod that adds smooth perspective transitions and camera roll during elytra flight.

Adds cape-like movement physics to the elytra while worn on a player's back.

Lets players brake and slow down during elytra flight by pressing the sneak key, reducing landing damage.