Personally, i would be upfront. Whatever job you are appointed to, you will soon be absent for at least 12 weeks, albeit spread over 2 occasions. Depending on your industry, absence over summer months could cause cover issues for your employers and your new colleagues and the staffing plans that they have scheduled.
Whatever the legal protections/discriminations/protected characteristics wrongs or rights you may be able to exercise , your absence could have a massive impact on your new colleagues and new employer. You could in theory be taken on now, with a view specifically to summer being staffed where, you are working. Then you say you can't.
Personally i would disclose this as a morally right thing to do. While you may be appointed without this disclosure
and then not entitled
to sick pay etc to cover your procedures, it would be the general affect on your new colleagues and possible bad feeling it would cause with new employer; that i would worry about.
Personally, i would never apply or start a new job if i knew i were going to be absent for periods of time early on. I even left a job 16 yrs ago when i became pregnant with my 2nd DC, as i knew i would not return after mat leave. As a manager, i understood the implications of my maternity absence on my Dept. I left to be the ftm i had financially planned for. It was better for me to leave and then for them to appoint my replacement, permanently and immediately. That person then knew their appointment was permanent and the business could plan and move forward.
I have witnessed others do similar as you propose and in all honesty, that person has never been able to assimilate into staff relations or company, upon their return.
I work in schools now and have done for a long time. I have seen this type of scenario and it has been massively disruptive to our children. Both children and their parents expect continuity in an academic year , where possible. For example, if a teacher with their own class started, knowing they would then be absent for a least 12 weeks of their class during that academic yr; this would disrupt a large number of children who do not like cover teachers. Most children , primary and secondary do not respond well to cover teachers. It is upsetting to them. This is just am example which i appreciate may not apply to you. Equally, things happen in life that no one can for-see. But personally, to knowingly take on a role where you know you will be absent for at least 12 weeks, requires honesty from the start in my view.