OKO, I originally had the same answer as yours (not the law for idiots) for the case of the goal keeper too but changed it for the following reason:
Although not said in the question, what if the ball that was about to enter the goal was kicked by an opponent who was moving towards the goal. Then all the conditions for the DOGSO are met. An opponent who was moving twards the offenders goal was denied a goal-scoring opportunity by an offence which was punishable by a free kick (IFK).
The law does not state that the attacker has to be fouled but only an offence needs to committed by a defending player and it has.
No. For two reasons, although not so clear in this season's LOTG, previous Q&As now melded, badly, into the LOTG state that the denying an opponent was a to hold, push, obstruct, or chop down or anyone of the million other variations. It was committed on an opponent.
This is an offence against the Laws. specifically DHB, not an opponent. The keeper is specifically excluded from committing a DHB offence in their own PA. Nothing may override this. Therefore, they can not be guilty of DOGSO -H in their own PA. DOGSO -O does not apply to handling.
Any opinions expressed here are mine alone and not necessarily indicative of any formal Referee's body unless otherwise stated.
The accidental one is just that, an accident. Regardless of which players equipment comes off by accident, it is play on. In this case the question says the ball goes out so the restart would be a corner.
you say here that is a play on (although in this senario the ball goes out) if a boot came off (accident) this is play on correct? can that play make an attempt on the ball