Skip to content

Disabled a-radio Component Still Clickable #4997

Closed
@aistfan98

Description

@aistfan98
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0

Environment

macOS Mojave Version 10.14.16, Google Chrome Version 93.0.4577.82 (Official Build) (x86_64), Vue Version ^3.0.5

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Follow the provided Code Sandbox link. When arriving at the page, you might get an error in the browser saying something along the lines of "You cannot use import statements outside of a module." Simply refresh the browser page, and this error should be gone. For some reason Code Sandbox does not always transpile all modules on load.

Anyway, once you have the working app, simply attempt clicking the disabled radio button. You will see that the associated on click handler runs, which is unexpected. In addition, at various points around the button itself, the user's cursor will shift from the 'not-allowed' state to 'pointer', which is also unexpected. I will include a screenshot of this pointer cursor on this issue.

Screen Shot 2021-12-07 at 2 10 39 PM

What is expected?

Disabled radio buttons should not be clickable, just like regular disabled buttons. The cursor should always be in a "not-allowed" state when hovering over the disabled a-radio component, and the associated onClick handler should not run on click.

What is actually happening?

Not only does the onClick hander run when the disabled a-radio component is clicked, but the cursor also transitions to a "cursor" state at certain points around the button

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