Friction opposes motion (opposite of velocity), it doesnt matter whether the object is accelerating or decelerating. In this scenario it is the sole cause the deceleration so the frictional force is in the opposite direction to positive velocity..
For their diagram, Id guess the positive direction etc is to the left as friction is acting to the right. Similarly, a represents an arbitrary (positive) acceleration. For this example it turns out to be negative as it must equal the deceleration caused by the friction. When they use v-u+at, ithe sign of a is correctly worked out and it is decelerating as the question states. Note for a force diagram, once the positive direction is clearly stated, you'd mark on the force directions (and their magnitudes) relative to that.
Edit - as a related example, imagine you threw a ball up in the air and its motion was solely determined by gravity. Assuming positve is up, you'd mark an arbitrary positive acceleration a as upwards, g (9.8) acting downwards and youd get an equivalent diagram to what they have here. Then newton 2 gives
a = -9.8
so it is decelerating (upwards) or equivalently accelerating downwards.