Skip to content

Commit

Permalink
Merge pull request #5794 from ilzamcmed/follow-up-LPD-17368
Browse files Browse the repository at this point in the history
fix(@clayui/pagination-bar): LPD-17368 Follow up - Add aria-label
  • Loading branch information
matuzalemsteles authored Apr 2, 2024
2 parents 4dd8faf + b07e19d commit 681e97e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ module.exports = {
statements: 98,
},
'./packages/clay-pagination-bar/src/': {
branches: 100,
branches: 95,
functions: 88,
lines: 94,
statements: 95,
Expand Down
5 changes: 5 additions & 0 deletions packages/clay-drop-down/src/DropDownWithItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export interface IProps

menuWidth?: React.ComponentProps<typeof ClayDropDown>['menuWidth'];

/**
* Prop to use language keys.
*/
messages?: string;

/**
* Function for setting the offset of the menu from the trigger.
*/
Expand Down
5 changes: 5 additions & 0 deletions packages/clay-pagination-bar/src/DropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ import React from 'react';
*/
const ClayPaginationBarDropDown = ({
className,
messages = 'Items Per Page',
trigger,
...otherProps
}: React.ComponentProps<typeof ClayDropDownWithItems>) => {
return (
<ClayDropDownWithItems
className={classNames(className, 'pagination-items-per-page')}
trigger={React.cloneElement(trigger, {
'aria-label': messages,
})}
{...otherProps}
/>
);
Expand Down

0 comments on commit 681e97e

Please sign in to comment.