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">
<ClockD />
<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}
</p>
</TextLoading>
@@ -92,11 +92,15 @@ function ItemDoctor({ doctor, loading, setDoctors, priority = false }) {
</p>
</CustomLoading>
{/* Arrow */}
<Link href={`/doctor/${doctor?.uuid}`}>
<Link
href={`/doctor/${doctor?.uuid}`}
aria-label={`مشاهده پروفایل ${doctor?.name || "پزشک"}`}
>
<Button
variant="contained"
onClick={handleLoading}
disabled={doctor?.loading}
aria-label={`مشاهده پروفایل ${doctor?.name || "پزشک"}`}
className="!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit"
>
<div className={doctor && doctor.loading ? "opacity-0" : ""}>
@@ -80,6 +80,10 @@ function AddressSelector({
</div>
),
}}
inputProps={{
...params.inputProps,
"aria-label": label,
}}
placeholder={label}
sx={{
borderRadius: "8px",
+1
View File
@@ -40,6 +40,7 @@ function SendReq({ filter, setFilter, setDataInURL, sendReq }) {
<Button
disabled={loading}
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]
!gap-2.5 !p-2.5 md:!p-4 !h-[calc(100%_-_8px)]"
>
@@ -21,6 +21,7 @@ function SelectSort({ filter, updateData }) {
displayEmpty
value={filter.sort}
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]"
renderValue={(value) => {
return (
+1 -1
View File
@@ -148,7 +148,7 @@ function Footer({ matchedCity }) {
{item.icon}
</a>
) : (
<span className="min-h-fit" aria-label={item.name}>
<span className="min-h-fit" role="img" aria-label={item.name}>
{item.icon}
</span>
)}