It would have to slide even with the front face. Then flip up. It would be the same as putting the hinge at the front, and the lid would still block access.It can absolutely be done. I can actually visualize the mechanics for one method in my head. A couple T-tracks on the bottom of the top and then a T with a cylindrical top or a notched out end of the track to allow it to pivot when fully extended would do the trick. Hidden pocket cabinet drawers do something similar.
Problem is I have no idea what the name of those parts would be to search for.