primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.97k stars 1.06k forks source link

Password: (accessiblility) cannot access toggle button using keyboard #6046

Closed arnodemer closed 8 months ago

arnodemer commented 9 months ago

Describe the bug

focus cannot be moved to Password's toggle button, then cannot toggle using keyboard

Reproducer

No response

PrimeReact version

10.5.1

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. go to Password toggle show case : https://primereact.org/password/#togglemask
  2. use tab to set focus on password field
  3. hit tab several times, focus is never set on toggle password button

Expected behavior

Toggle button should be able to be activated using keyboard Focus should also stay on toggle button when password state is toggled.

melloware commented 9 months ago

Agreed it looks like PrimeVue has not implemented this yet either.

akshayaqburst commented 9 months ago

@melloware Can I work on this?

arnodemer commented 9 months ago

Hi ! it would be nice if we could also set a tooltip for this toggle button (password component already have one, but it's for input ). Thanks a lot !

melloware commented 9 months ago

@akshayaqburst sure!

akshayaqburst commented 9 months ago

@melloware Created PR for review - https://github.com/primefaces/primereact/pull/6052. Thanks,

melloware commented 9 months ago

Some code review comments. Looking good so far!