fix(accessibility): add aria-labels for improved screen reader support

This commit is contained in:
hamed
2026-06-21 17:00:23 +03:30
parent cbae19d270
commit 35e8b65342
5 changed files with 13 additions and 3 deletions
+6 -2
View File
@@ -75,7 +75,7 @@ function ItemDoctor({ doctor, loading, setDoctors, priority = false }) {
<div className="flex my-4 items-center justify-start gap-0.5"> <div className="flex my-4 items-center justify-start gap-0.5">
<ClockD /> <ClockD />
<TextLoading loading={loading} width={150} height={15}> <TextLoading loading={loading} width={150} height={15}>
<p className="text-[#7E7E7E] text-[12px] font-normal"> <p className="text-[#616161] text-[12px] font-normal">
ساعت کاری: {doctor?.hours_of_work} ساعت کاری: {doctor?.hours_of_work}
</p> </p>
</TextLoading> </TextLoading>
@@ -92,11 +92,15 @@ function ItemDoctor({ doctor, loading, setDoctors, priority = false }) {
</p> </p>
</CustomLoading> </CustomLoading>
{/* Arrow */} {/* Arrow */}
<Link href={`/doctor/${doctor?.uuid}`}> <Link
href={`/doctor/${doctor?.uuid}`}
aria-label={`مشاهده پروفایل ${doctor?.name || "پزشک"}`}
>
<Button <Button
variant="contained" variant="contained"
onClick={handleLoading} onClick={handleLoading}
disabled={doctor?.loading} disabled={doctor?.loading}
aria-label={`مشاهده پروفایل ${doctor?.name || "پزشک"}`}
className="!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit" className="!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit"
> >
<div className={doctor && doctor.loading ? "opacity-0" : ""}> <div className={doctor && doctor.loading ? "opacity-0" : ""}>
@@ -80,6 +80,10 @@ function AddressSelector({
</div> </div>
), ),
}} }}
inputProps={{
...params.inputProps,
"aria-label": label,
}}
placeholder={label} placeholder={label}
sx={{ sx={{
borderRadius: "8px", borderRadius: "8px",
+1
View File
@@ -40,6 +40,7 @@ function SendReq({ filter, setFilter, setDataInURL, sendReq }) {
<Button <Button
disabled={loading} disabled={loading}
onClick={filterData} onClick={filterData}
aria-label="جستجوی پزشک"
className="!flex !m-1 !rounded-[4px] !w-[36px] sm:!w-[42px] md:!w-[49px] lg:!w-[56px] !min-w-[36px] sm:!min-w-[42px] md:!min-w-[49px] lg:!min-w-[56px] className="!flex !m-1 !rounded-[4px] !w-[36px] sm:!w-[42px] md:!w-[49px] lg:!w-[56px] !min-w-[36px] sm:!min-w-[42px] md:!min-w-[49px] lg:!min-w-[56px]
!gap-2.5 !p-2.5 md:!p-4 !h-[calc(100%_-_8px)]" !gap-2.5 !p-2.5 md:!p-4 !h-[calc(100%_-_8px)]"
> >
@@ -21,6 +21,7 @@ function SelectSort({ filter, updateData }) {
displayEmpty displayEmpty
value={filter.sort} value={filter.sort}
onChange={handleClick} onChange={handleClick}
inputProps={{ "aria-label": "مرتب سازی پزشکان بر اساس امتیاز" }}
className="!w-[198px] !max-w-[305px] lg:!w-full text-[14px] md:text-[16px] !bg-transparent lg:!bg-[#FFF] !h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px]" className="!w-[198px] !max-w-[305px] lg:!w-full text-[14px] md:text-[16px] !bg-transparent lg:!bg-[#FFF] !h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px]"
renderValue={(value) => { renderValue={(value) => {
return ( return (
+1 -1
View File
@@ -148,7 +148,7 @@ function Footer({ matchedCity }) {
{item.icon} {item.icon}
</a> </a>
) : ( ) : (
<span className="min-h-fit" aria-label={item.name}> <span className="min-h-fit" role="img" aria-label={item.name}>
{item.icon} {item.icon}
</span> </span>
)} )}