Repository navigation
chore(a11y): standardize keyboard focus - #49579
Conversation
|
👀 Review this PR in a CodeSee Review Map |
|
I am assuming we only want the keyboard focus indicator to show if the user is actually using a keyboard? That's the way I've been implementing the focus indicator as I've been fixing accessibility issues. If so, then this needs to target the
|
|
The way I saw this working would be that we define a default outline color (--blue-mid), outline width (3px), outline style (solid), and outline offset (0) (which would be the same for both themes) on all focusable elements using the I'm guessing that client/src/components/layouts/global.css is where we would want to define the default? @Sboonny, correct me if I'm wrong? As for the adjustments, I don't think the color will ever need to change (although I could be wrong about this) except for one specific case, the steps grid. Because we are using a blue background to mark completed steps the outline needs to be black in the light theme and white in the dark theme. I think most of the adjustments will need to be made to the offset, and possible width. These adjustments could be different for each theme. There are a lot of focusable elements, so this PR is potentially going to take a while. @a2937, do you mind if I help out and push changes directly to this PR? |
|
I don't mind the additional assist. |
I am happy with it in the global.css file 👍 |
|
What do you mean by overwrite? as change the values in bootstrap file itself? 🤔 I was the one to suggest deleting bootstrap.css #49579 (comment), because:
|
|
Thanks for providing more context. The minified files are for consumption only as the styles context such as bootstrap main, normalization, customization, etc. is removed during magnification. It works for me if you are on board with it. It would be great if you could share your review process for the minified file so I could give it a proper review before merge. |
When done correctly, you should see git diff and compare what does the main bootstrap add to the new bootstrap. |
|
@Sboonny @ahmadabdolsaheb A quick question. Is it the intent to make sure all focus indicators are functioning the way we want them to in this PR? Or is the intent just to get the default in place and then in other PRs we can fix any that still aren't working correctly? |
|
I have missed the comment about adding a commit, sorry for early approval.
I have reviewed this PR based, on setting default in place, I have known about logo issue, before the PR was opened, and I wouldn't have wanted this PR to include these fixes. But the logo was something that can be solved without the need for the PR to merge, so I was comfortable with it done in second PR, if you see an issue that need to be fixed in this PR, feel free to push the commit. TD;LR: I wanted to set the default outline |
ahmaxed
left a comment
There was a problem hiding this comment.
LGMT upon resolving the conflicts.
|
I tried to do a merge request but it probably failed. |
|
Looks like it worked just fine 😁 |
|
To expand on my earlier comment. For example, in the steps, the focus outline on both the reset and ask for help buttons are not showing properly. Do we want to fix that in this PR? I haven't gone through every focusable element to ensure that the outline is showing properly. Is this something we want to verify before we merge this PR? Or should we just get these defaults merged now and then I will go through and fix any minor issues I find in separate PRs? Also, I asked in the issue if we wanted the outline to wrap around the borders of buttons so that the border still shows or if we wanted the outline to cover the border. @ahmadabdolsaheb leaned toward covering the border, and so do I. So do we want to take care of that in this PR as well? |
|
Sorry for the delay, I have investigated it more, and the lower-jaw buttons can be fixed, by removing the extra If you are planning to do more, like cover the border of the lowerjaw button too, maybe it's better to do it in different PR, and add the text for the buttons 🤔. Either way this shouldn't be merged with that lower-jaw's buttons looks |
|
btw, the logo is broken 😞, my fix didn't help much. I will create another PR turning the layout from flex to grid, and be done with it once and for all. I don't think this should be blocked by my future PR. |
|
I pushed two fixes, one for the icon buttons in the lower jaw and one for the bread crumb links. I don't think I'm seeing any other blockers. There is some minor tweaking that probably needs to be done but that can be handled in separate PRs. I'm going to hold of on officially reviewing this just a little longer as I really want to go through everything one last time but I can't do that until later this evening. |
bbsmooth
left a comment
There was a problem hiding this comment.
I am not finding any blockers that should prevent merging this PR. There are some minor issues I will address in separate PRs.
For what it's worth, you have my LGTM.
|
Every time you give your approval, I feel safe that the site is on better state, thank you so much for this 👍 |
* Create a focus indicator * Use two different colors for the palletes. * Use focus-visible instead. * Remove redundant css * Use blue-mid for the focus outline color. * Add a global fallback. * Clean up the rules some more. * Remove some bootstrap styling. * fix: display focus outline on all sides of lower jaw icon buttons * fix: breadcrumb focus outlines --------- Co-authored-by: Ahmad Abdolsaheb <[email protected]> Co-authored-by: Bruce B <[email protected]>



Checklist:
mainbranch of freeCodeCamp.Closes #48121
Same color for both the dark and light color palettes since it is a medium-color. It was actually pretty easier adding the variable to the css variable list and the focus selector to globals.css.