?
avatar rjharishabh
rjharishabh
20 May 2021

Steps to reproduce the issue

Any radio button that has a switcher class
switch

Expected result

When we click No label, the button will be checked and the label changed to Yes,
as well as when we click Yes label, the button will be off, and the label changed to No

Actual result

When we click No label, the button will be checked, and label changed to Yes,
but when we click Yes label, nothing will be changed.

switcher

avatar rjharishabh rjharishabh - open - 20 May 2021
avatar joomla-cms-bot joomla-cms-bot - change - 20 May 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 May 2021
avatar rjharishabh rjharishabh - change - 20 May 2021
The description was changed
avatar rjharishabh rjharishabh - edited - 20 May 2021
avatar brianteeman
brianteeman - comment - 20 May 2021

Please think like a user, not a developer

Think like a developer and you would see that its a bug

Maybe there some a11y issue, I don't know

Dont blame a11y for everything. This bug actually breaks accessibility

avatar rjharishabh rjharishabh - change - 20 May 2021
The description was changed
avatar rjharishabh rjharishabh - edited - 20 May 2021
avatar rjharishabh
rjharishabh - comment - 20 May 2021

Please think like a user, not a developer

Think like a developer and you would see that its a bug

Maybe there some a11y issue, I don't know

Dont blame a11y for everything. This bug actually breaks accessibility

I don't know, whether this is a bug or not (As a developer). Maybe there some reasons for doing this way.

But as a user, I will definitely consider it as a bug

avatar brianteeman
brianteeman - comment - 20 May 2021

It's a BUG

avatar brianteeman
brianteeman - comment - 20 May 2021

To be absolutely clear - clicking on any of the labels should change the state

avatar eopws
eopws - comment - 20 May 2021

The radio button is made in a weird way itself.

img

It uses two inputs (what for?) and two labels. I suppose it happens because of the "No" label overlaps the "Yes" label.
I think it's better to remake a radio button at all.

avatar brianteeman
brianteeman - comment - 20 May 2021

It uses two inputs (what for?) and two labels.

How else do you have two radio

I suppose it happens because of the "No" label overlaps the "Yes" label.
I think it's better to remake a radio button at all.

Please dont

avatar eopws
eopws - comment - 20 May 2021

Please dont

Ok, I will try to search another ways to solve the issue =)

avatar eopws
eopws - comment - 20 May 2021

It uses two inputs (what for?) and two labels. I suppose it happens because of the "No" label overlaps the "Yes" label.
I think it's better to remake a radio button at all.

Oops, I got my error, for some reason I was thinking that the radio button is a checkbox button. I feel so ashamed.
I gotta be more careful. Please never mind..

avatar dgrammatiko
dgrammatiko - comment - 20 May 2021

How else do you have two radio

With a single button. Button can have a boolean value (0/1, true,false, etc) and also is better for A11Y with aria-pressed, eg

<button type="button" aria-pressed="true">  
  Notify by email
</button>  

There's a nice explanation: https://www.smashingmagazine.com/2017/09/building-inclusive-toggle-buttons/

or you can check my dark theme swither live: https://codepen.io/dgrammatiko/pen/bGNXVQQ?editors=1010
repo: https://github.com/dgrammatiko/dark-switch

avatar brianteeman
brianteeman - comment - 20 May 2021

but then thats not b/c in any way and forces changes that are not required on everyone.

anyway the issue here is that it used to work correctly and now it doesnt

avatar dgrammatiko
dgrammatiko - comment - 20 May 2021

@brianteeman my response was purely educational and I was responding to the gsoc student. I'm not suggesting such a change at this point of j4...

My bad: I quoted the wrong text in my reply

avatar rjharishabh rjharishabh - change - 21 May 2021
The description was changed
avatar rjharishabh rjharishabh - edited - 21 May 2021
avatar richard67 richard67 - change - 21 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-21 18:19:53
Closed_By richard67
avatar richard67 richard67 - close - 21 May 2021
avatar richard67
richard67 - comment - 21 May 2021

Closing as having a pull request. Please test #34085 . Thanks in advance.

avatar eopws
eopws - comment - 21 May 2021

image

@rjharishabh can you please tell how did you make the gif?

avatar rjharishabh
rjharishabh - comment - 22 May 2021

@rjharishabh can you please tell how did you make the gif?

@eopws I just convert mp4 to gif online

avatar brianteeman
brianteeman - comment - 22 May 2021

@rjharishabh can you please tell how did you make the gif?

Use licecap - it is free and available for all operating systems

avatar eopws
eopws - comment - 22 May 2021

Add a Comment

Login with GitHub to post a comment