Uh oh!
There was an error while loading. Please reload this page.
Fix button focus - #7287
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mikeesto
left a comment
There was a problem hiding this comment.
I don't understand why this component isn't a native <button> (there may well be a good reason). I think this change is an improvement because now it is focusable, but the default behaviour of href="#" is to jump the page to the top so that's not ideal either
ovflowd
left a comment
There was a problem hiding this comment.
I don't think this is an appropriate fix, we should be using tabindex and other properties.
ovflowd
commented
Nov 30, 2024
There are numerous reasons, mostly because all our "buttons" are links, this one is deceptively the only one that is not a button. Per specification a |
faridomarAf
commented
Nov 30, 2024
yeah guys this is not the proper way, sorry for late replying, you are right |
faridomarAf
commented
Dec 11, 2024
hey guys @mikeesto@AugustinMauroy@ovflowd@bjohansebas could you please review my code, if there is any suggestion PLZ 😊 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mikeesto
left a comment
There was a problem hiding this comment.
Button focus seems good to me 👍
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bjohansebas
left a comment
There was a problem hiding this comment.
Everything seems to be working fine, LGTM
Uh oh!
There was an error while loading. Please reload this page.
ovflowd
commented
Dec 13, 2024
Apologies for not checking in here, have been busy with personal matters 🙏 |
hi @bmuenzenmeyer , sorry for late response, I think the changes which I made in Button.tsx file, it caused the error, so a I checked the original code that is working, I would do my best to solve the issue |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Claudio W <cwunder@gnome.org>
ovflowd
commented
Dec 16, 2024
Thanks for the first time contribution! Excited to get this merged ✨ |
faridomarAf
commented
Dec 16, 2024
hey guys thank you so much for your follow up, actually it was my fist time to contribute in an open source project. all your comments an code views values much more for me |
Button focusable issue fixed
Description
While we are using a Link-component for both Button & Link purposes, there should be a logic when it use as a Link it should acts as a Link, and when it use as Button it should as Button.
1: Enhancements to Button Component::
roletobuttononly when used as a button.onClickandtabIndexbehave appropriately based on component usage.2: Enhancements to CodeBox Component:
useStatehook to manage the disabled state of theCopybutton.useEffectto dynamically update the button'sdisabledstate based on the presence of content in the<pre>element.tabIndexon the<pre>element for improved accessibility.Copybutton if no content is available to copy.Validation
https://www.loom.com/share/6f237ae46e7945f48650c1e710399e6f?sid=f8f6c2fc-faca-46e8-901a-021c38f091f9
Related Issues
#7247
Check List
npm run formatto ensure the code follows the style guide.npm run testto check if all tests are passing.npx turbo buildto check if the website builds without errors.