In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
If you have a medical challenge that makes it intolerable to wear the hijab, you are allowed to skip it as long as you wear modestly.
In responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
If you have a medical challenge that makes it intolerable to wear the hijab, you are allowed to skip it as long as you wear modestly. As for what constitutes a modest attire for women in Islam, let me state the following:
Islamic rules of modest attire for women are above all intended to help them maintain their dignity, respect, and honor so that they are not sexualized or treated as objects for satisfying man’s carnal desires or passions.
What is important in proper Islamic attire is that it should cover the parts of the body that need to be covered and therefore, cannot be exposed. And to do so with modest attire that is not flamboyant, revealing or highlighting the contours and shapes of the body.
This is because the way we dress sends a message to those who see us; the message could be of modesty, purity, and dignity, or-it could-God forbids, seduction, and inviting or engendering evil thoughts or awakening the carnal desires.
As Muslims, we are to send out messages of purity and chastity. The best people are those who when the people see them, they are reminded of Allah.
Almighty Allah knows best.