Repository navigation
fix(a11y): settings toggles - #49664
Conversation
|
👀 Review this PR in a CodeSee Review Map |
Didn't do much, to be honest. and I am always happy with the help, ping me if you want me to pick up a task. |
|
@Sboonny What I really need to know is how we want to style the radio buttons. That's the main blocker. |
|
I don't mind the current look, but I will bring this to the Wednesday meeting, if needed 👍 |
|
@ahmadabdolsaheb I would be hesitant to use square boxes here since they are usually associated with check boxes, not radio buttons. |
cf7c125 to
e75eeb8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
You'll notice that |
Sure, we could go with round ones. |
There was a problem hiding this comment.
Btw, you are right in this #49664 (comment), if you want to revert the lastest commit, please do so.
My suggestion was based on lack of knowledge, which you have provided. this is good to go after fixing the conflicts 👍.
|
@Sboonny Yes, go ahead. |
chore: remove unnecessary elements remove unnecessary CSS/fix responsiveness feat: add keyboard focus for radio buttons fix: use defaultChecked and onChange for radio buttons fix: do not change color on hover over pressed button fix: focus outline should show on all four sides of button chore: setPrivacyTogglesToPublic feat: add tick mark to active button refactor: remove unnecessary ternary fix: focused button should not stack on top of flash alert feat: standardize radio button color fix: remove random id generation
a5f3c39 to
0c5047e
Compare
|
@Sboonny, are you done with your RTL updates? Everything looks pretty good, there are just a few minor things I'd like to adjust, but I want to wait until you are done. |
|
Yeab, please go ahead. 👍 |
|
@Sboonny I updated the styling on the buttons so that the text is always centered and the check mark will be positioned just to the outside of the text. I also added a slight gap between the buttons so that the outline focus indicator would show on all four sides of both buttons. But if you would rather not have that The radio buttons still look the same but I switched their various margins to logical properties so they would look the same in rtl languages. |
No need, Idk what the others think, but I am happy with the current looks 👍. |
|
@ahmadabdolsaheb I agree, in dark mode it is hard to tell the difference between the selected and non-selected radio button. Browsers don't provide a lot of options for styling native radio buttons. I will see if I can somehow make the difference between the two states larger using only CSS but I fear we may need to switch to some sort of custom solution. That won't be too difficult though. |
|
@ahmadabdolsaheb Custom radio button styling added. Should be very clear now both in light and dark mode. |
ahmaxed
left a comment
There was a problem hiding this comment.
Thanks for the hard here. I want to get this in asap, but there are a few changes that improve the toggle buttons in another pr:
- toggle-button.tsx in the helper folder could be removed since it is not used anywhere.
- checkIconStyle should be moved to a CSS file.
- we have toggle buttons in video courses (scientific-computing-with-python, etc.), the newly added toggles should replicate the style of the pre-exiting toggles for consistency.



Checklist:
mainbranch of freeCodeCamp.Closes #49214
Sorry @Sboonny, I didn't realize you were working on this as well.
I just went with the browser's default radio buttons. Not sure if we want to use customized buttons?