The first thing we need to know when discussing a gamepad is
- What browser engine is being used? (Chrome)
- What gamepad device are you using? (Is it a popular controller?)
I have many controllers, for example cheap USB N64 controllers, and they have this same exact issue.
It seems to be a very common problem for some controllers to have the DPAD acting as an axis with strange values.
Solution 1
Submit a bug report to the Chrome devs.
Tell them the gamepad device ID string, and the exact inputs for each button and axis. Perhaps then suggest then which button should be what, like button 16 should be "A".
This will allow them gamepad to be recognized and mapped properly for everyone officially.
Solution 2
Manually identify which controller the player is using. And make adjustments based on the gamepad ID string.
This is good practice anyway, since you'll want to detect at a minimum wether the player is using Sony, Xbox, or Nintendo brand controller so that you can show the appropriate button prompts. While it use to just be Xbox style controllers that were common on PC, other brands have increasingly become popular in recent years.
After detecting the type of controller which is connected, you can then make sure that these controllers use different gamepad inputs.
For instance, when the axis = 0.714, then count that as the left Dpad as being held down.