Skip to content

Commit

Permalink
Add aria-labels to BadgeButton components in SearchFiltersColumn for …
Browse files Browse the repository at this point in the history
…improved accessibility
  • Loading branch information
Adamik10 committed Nov 11, 2024
1 parent 424ce9d commit 00bc5f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/shared/searchFilters/SearchFiltersColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const SearchFiltersColumn = ({
ref={elementRef}>
{facet.values.map((value, index) => (
<BadgeButton
ariaLabel={value.term}
onClick={() => toggleFilter(facet.name, value.term, router)}
isActive={!!searchParams.getAll(facet.name).includes(value.term)}
key={index}>
Expand All @@ -71,6 +72,7 @@ const SearchFiltersColumn = ({
</div>
{hasOverflow && (
<BadgeButton
ariaLabel="Vis flere"
classNames={cn(`pl-3 w-auto flex flex-row items-center self-start ml-1`)}
onClick={() => {
setIsExpanded(prev => !prev)
Expand Down

0 comments on commit 00bc5f6

Please sign in to comment.