freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

fix(a11y): completed-step focus accessibility

Open harmeet01singh opened this issue 2 years ago • 8 comments

Changed completed-step outline color to secondary color on focus

Checklist:

Closes #50023

harmeet01singh avatar May 20 '23 12:05 harmeet01singh

:eyes: Review this PR in a CodeSee Review Map

View the CodeSee Map of this change

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

ghost avatar May 20 '23 12:05 ghost

The focus outline looks good in both light/dark mode.

From the issue:

Also, while we are fixing this, I would recommend we increase the font weight from 700 to 900 and the font size from 1.3rem to 1.5rem on the completed steps to make the difference in those numbers stand out a little more since we can't rely on the background color for the completed steps to convey their state since they don't have enough color contrast with the background.

Any objection to doing this? I feel like the current difference in the display of the completed step numbers is barely enough to be detectable and thus we are just barely fulfilling the requirement for WCAG 1.4.1.

bbsmooth avatar May 20 '23 23:05 bbsmooth

Had some doubts in that, you only want this behaviour to occur when the elements are keyboard focused only or on mouse hover as well. I think it makes sense to do it for both.

harmeet01singh avatar May 21 '23 06:05 harmeet01singh

Hi @bbsmooth , any update on this? Are we taking the font size changes on as other features? Or should I do the changes in this PR itself?

harmeet01singh avatar May 22 '23 15:05 harmeet01singh

@harmeetsingh01, adding hover is outside the scope of the issue, and what Bruce and I worried about based on the original issue.

We can discuss it after the original issue is closed, because we can improve the design as well if needed.

Sboonny avatar May 26 '23 11:05 Sboonny

Understood @Sboonny , will add the discussed font changes on focus in a while then.

harmeet01singh avatar May 27 '23 14:05 harmeet01singh

@harmeetsingh01 Sorry, I've been gone for the past couple of weeks and forgot to get back to you on the font size and weight. It's not my decision, but it sounds like @Sboonny is OK with increasing both to my suggestions for completed steps.

Please note, this has nothing to do with either focus or hover. The font changes should be present at all times for the completed step. Right now the font size on a completed step is 1.3rem and the font-weight is 700. But that change is hardly noticeable. So I am suggesting we up it to 1.5rem and 900 to make it stand out more.

bbsmooth avatar May 27 '23 14:05 bbsmooth

Oh, Thanks for clearing it up, I was a bit confused and thought we want the increase in font size on focus or hover. Understood, will push the necessary change.

harmeet01singh avatar May 27 '23 15:05 harmeet01singh

Thanks to you @Sboonny and @bbsmooth as well for helping me. Looking forward to more such collaborations in the future.

harmeet01singh avatar May 28 '23 19:05 harmeet01singh