Skip to content

Commit

Permalink
fix role for list elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram Sharan Rimal committed Jan 9, 2025
1 parent a4575b5 commit 61d2cd6
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions overrides/home/carousel/carousel-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export function ItemPanel({ item, linkComponent: LinkComponent }) {
}

export default function CarouselItem({ item, itemIdx, onTitleClick, shouldProgress, progressDone, progressPercentage, selected, linkComponent: LinkComponent }) {
return<li
role="tab"
className="usa-card tablet:grid-col-4"
>
<Card
return <Card
gridLayout={{ tablet: { col: 4 } }}
containerProps={{className:`hover:bg-base-lightest padding-x-1 radius-0 border-0 animation--transition ${(selected || shouldProgress)? 'opacity-100':'opacity-50'}`}}>
role='tab'
aria-selected={selected.toString()}
aria-label={`Slide ${itemIdx+1}`}
aria-controls={`carousel-item-${itemIdx + 1}`}
containerProps={{className:`∫ padding-x-1 radius-0 border-0 animation--transition ${(selected || shouldProgress)? 'opacity-100':'opacity-83'} `}}>
<ProgressBar shouldProgress={shouldProgress} progressDone={progressDone} progressPercentage={progressPercentage}selected={selected} />
<CardBody className="padding-left-0 position-relative">
<h2 className="tablet:margin-top-1 carousel--title text-bold veda-color--base">
Expand All @@ -63,10 +63,7 @@ export default function CarouselItem({ item, itemIdx, onTitleClick, shouldProgre
className="position-absolute top-0 left-0 width-full height-full blocklink"
onClick={() => { onTitleClick(item); } }
type="button"
role="tab"
aria-label={`Slide ${itemIdx+1}`}
aria-selected={selected.toString()}
aria-controls={`carousel-item-${itemIdx+1}`}
aria-label={`Open details for ${item.title}`}
children={undefined} />
</CardBody>
<CardFooter className="padding-left-0 padding-top-1">
Expand All @@ -75,7 +72,8 @@ export default function CarouselItem({ item, itemIdx, onTitleClick, shouldProgre
<span className="padding-left-1">Read more</span>
</LinkComponent>
</CardFooter>
</Card>
</li>
</Card>


}

0 comments on commit 61d2cd6

Please sign in to comment.