홈패널 접근성 처리

- 베스트셀러.온세일,파퓰러쇼 부분적용
This commit is contained in:
junghoon86.park
2024-05-28 19:06:33 +09:00
parent 199517c704
commit 987ceaf068
5 changed files with 68 additions and 19 deletions

View File

@@ -148,23 +148,36 @@ const BestSeller = ({ order, scrollTopBody, handleItemFocus }) => {
offerInfo,
},
itemIndex
) => (
<TItemCard
key={prdtId}
imageAlt={prdtId}
imageSource={imgUrl}
priceInfo={priceInfo}
productName={prdtNm}
isBestSeller={true}
productId={prdtId}
rank={rankOrd}
onFocus={handleFocus(itemIndex)}
onBlur={handleBlur(itemIndex)}
onClick={handleCardClick(patnrId, prdtId)}
offerInfo={offerInfo}
spotlightId={"bestsellerItem" + itemIndex}
/>
)
) => {
const rankText =
rankOrd === 1
? rankOrd + "st"
: rankOrd === 2
? rankOrd + "nd"
: rankOrd === 3
? rankOrd + "rd"
: rankOrd + "th";
return (
<TItemCard
key={prdtId}
imageAlt={prdtId}
imageSource={imgUrl}
priceInfo={priceInfo}
productName={prdtNm}
isBestSeller={true}
productId={prdtId}
rank={rankOrd}
onFocus={handleFocus(itemIndex)}
onBlur={handleBlur(itemIndex)}
onClick={handleCardClick(patnrId, prdtId)}
offerInfo={offerInfo}
spotlightId={"bestsellerItem" + itemIndex}
firstLabel={rankText}
label={itemIndex * 1 + 1 + " of " + bestSellerDatas.length}
lastLabel=" go to detail, button"
/>
);
}
)}
{drawChk && (
@@ -173,6 +186,7 @@ const BestSeller = ({ order, scrollTopBody, handleItemFocus }) => {
className={css.displayBox}
onClick={handleMoreCardClick}
spotlightId={"bestseller-item-more-btn"}
aria-label="See more button"
></SpottableComponent>
</div>
)}