Skip to content

Commit

Permalink
fix: primefaces primefaces#6046, Password: (accessiblility) cannot ac…
Browse files Browse the repository at this point in the history
…cess toggle button using keyboard
  • Loading branch information
akshayantony55 committed Feb 28, 2024
1 parent fb6e5af commit b8c29d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/password/Password.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const Password = React.memo(
});

const onEyeIconKeyPress = (e) => {
return e.key === 'Enter' ? toggleMask(): ''
return e.key === 'Enter' ? toggleMask() : '';
};

const createIcon = () => {
Expand All @@ -283,7 +283,7 @@ export const Password = React.memo(
{
key: 'hideIcon',
role: 'button',
tabIndex: props.tabIndex || "0",
tabIndex: props.tabIndex || '0',
className: cx('hideIcon'),
onClick: toggleMask,
onKeyDown: onEyeIconKeyPress
Expand All @@ -295,7 +295,7 @@ export const Password = React.memo(
{
key: 'showIcon',
role: 'button',
tabIndex: props.tabIndex || "0",
tabIndex: props.tabIndex || '0',
className: cx('showIcon'),
onClick: toggleMask,
onKeyDown: onEyeIconKeyPress
Expand Down

0 comments on commit b8c29d9

Please sign in to comment.