Skip to content

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

@sianford

Description

@sianford

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions