Women and the graveyard

Imam Bukhari has recorded a Hadith of Sayyidatuna Umm Atiyya (Radhiallaahu
Anha) that she said, ‘We were prohibited from following the Janaaza, i.e.
until the graveyard.’ (Bukhari Hadith No.1278; See Fathul Baari vol.3
pg.187)

A similar narration is recorded by Imaam Abu Dawud on the authority of
Sayyiduna Abdullah ibn Abbaas (Radhiallaahu Anhu).

However, many of the scholars are of the opinion that the above law has been
obliterated by the following narration recorded by Imaam Muslim in his Sahih
on the authority of Sayyiduna Abdullah ibn Mas’ood (Radhiallaahu Anhu) that
Rasulullah (Sallallaahu Alayhi Wasallam) mentioned, ‘I had prevented you
from visiting the grave, (as of now) you all should visit it for it reminds
one of the Aakhirat.’ (Sahih Muslim)

Based on this, the previous law mentioned above was abrogated. Hence, the
permissibility of visiting the graveyard includes males and females.
However, the reason for prohibiting females from visiting graves is due to
our corrupted environment wherein women who do not adhere to the laws of
Hijaab and hence strange men are attracted towards them. Therefore, it is
not permissible for young females to visit the graveyard.

However, if the laws of the Shariah (Hijaab, intermingling, crying, etc.)
are not violated then the prohibition may be set aside. Since generally the
women visiting the graves are not free from the above aspects, they should
refrain from doing so.

If a female visits the grave to remember death and soften without crying .
there is nothing wrong if they are old. It is Makrooh (not permissible) if
they are young (Shaami vol. 1 p. 665 – Maajidiyya) See Umdatul Qaari vol.8
pg.69