carbon icon indicating copy to clipboard operation
carbon copied to clipboard

[Textbox] - onClick handler is still being passed when the component is disabled

Open sianford opened this issue 10 months ago • 2 comments

Description

When the component is disabled, NVDA screen reader registers that the input field is clickable with a mouse/trackpad.

Reproduction

https://carbon.sage.com/?path=/story/textbox--disabled

Steps to reproduce

  1. Open the Textbox Disabled story in Windows.
  2. Open NVDA with the Speech Viewer switched on.
  3. Click on the content of the disabled Textbox field.
  4. Inspect the Speech Viewer window.

Expected result: There is no response when the field is clicked on. This is not accessible at all using the keyboard (which is expected behaviour).

Actual result: The Speech Viewer states the field is "clickable".

JIRA ticket numbers (Sage only)

SKPU-11421

Suggested solution

Remove the onClick handler for disabled inputs.

Carbon version

132.1.0

Design tokens version

No response

Relevant browsers

Firefox, Chrome, Microsoft Edge

Relevant OSs

Windows

Additional context

VoiceOver used with Safari on Mac also states "To enter text in this feild, type." indicating it also detects the field is accessible.

Confidentiality

  • [X] I confirm there is no confidential or commercially sensitive information included.

sianford avatar Apr 11 '24 13:04 sianford