Unfortunately this was an intentional design by Microsoft. DirectInput (which SFML uses) merges the analog triggers as a single axis.
From Microsoft's documentation:
The combination of the left and right triggers in DirectInput is by design. Games have always assumed that DirectInput device axes are centered when there is no user interaction with the device. However, the Xbox controller was designed to register minimum value, not center, when the triggers are not being held. Older games would therefore assume user interaction.
The solution was to combine the triggers, setting one trigger to a positive direction and the other to a negative direction, so no user interaction is indicative to DirectInput of the "control" being at center.
In order to test the trigger values separately, you must use XInput.
Also DirectInput can't do vibration on Xbox controllers, only XInput can.
XInput is incredibly easy to use. But it won't support any controllers that aren't xbox controller compatible (such as flight sim joysticks, play station controllers, etc, which are DirectInput only).
Here's some example code to get the triggers as 0-1 floats:
XINPUT_STATE state;
if(XInputGetState(0,&state) == ERROR_SUCCESS)
{
float leftTrigger = state.Gamepad.bLeftTrigger / 255.0f;
float rightTrigger = state.Gamepad.bRightTrigger / 255.0f;
}
You don't need to initialise anything, you just ask it for the current state.
Of course as mentioned above, this won't work with non xbox compatible devices, so for wide device support you need multiple methods.