-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Revert "feat: Added focus ring for focus visible (#37700)" #38650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -239,9 +239,9 @@ | |||||||||||||
| /* --ads-v2-color-outline: var(--ads-v2-color-blue-300); | ||||||||||||||
| --ads-v2-border-width-outline: 2px; */ | ||||||||||||||
| /* TODO: fix focus issue across the platform */ | ||||||||||||||
| --ads-v2-color-outline: var(--ads-v2-color-blue-300); | ||||||||||||||
| --ads-v2-border-width-outline: 2px; | ||||||||||||||
| --ads-v2-offset-outline: -2px; | ||||||||||||||
| --ads-v2-color-outline: transparent; | ||||||||||||||
| --ads-v2-border-width-outline: 0; | ||||||||||||||
| --ads-v2-offset-outline: 0; | ||||||||||||||
|
Comment on lines
+242
to
+244
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert outline variable changes to maintain accessibility Setting outline to transparent and width to 0 removes visual focus indicators at the theme level. This impacts all components using these variables and breaks keyboard navigation accessibility. Restore the previous values: - --ads-v2-color-outline: transparent;
- --ads-v2-border-width-outline: 0;
- --ads-v2-offset-outline: 0;
+ --ads-v2-color-outline: var(--ads-v2-color-blue-300);
+ --ads-v2-border-width-outline: 2px;
+ --ads-v2-offset-outline: -2px;📝 Committable suggestion
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * ===========================================* | ||||||||||||||
|
|
@@ -251,22 +251,17 @@ | |||||||||||||
| --ads-v2-opacity-disabled: 0.6; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| :focus { | ||||||||||||||
| outline: none !important; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /* react-aria useFocusRing helper class*/ | ||||||||||||||
| .ads-v2-focus-ring { | ||||||||||||||
| outline: var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline) !important; | ||||||||||||||
| outline-offset: var(--ads-v2-offset-outline) !important; | ||||||||||||||
| outline: var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline); | ||||||||||||||
| outline-offset: var(--ads-v2-offset-outline); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /* Placeholder color */ | ||||||||||||||
| ::placeholder { | ||||||||||||||
| /* This needs to be important to override the placeholder color on main repo */ | ||||||||||||||
| color: var(--ads-v2-colors-control-placeholder-default-fg) !important; | ||||||||||||||
| opacity: 1; | ||||||||||||||
| /* Firefox */ | ||||||||||||||
| opacity: 1; /* Firefox */ | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| :-ms-input-placeholder { | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider maintaining consistency with the new design system.
This component uses a different focus style (border) compared to the outline approach used in the new design system components. Since this is in the 'ads-old' package, consider:
input:focus { - border: 1.2px solid var(--ads-old-color-fern-green); - box-sizing: border-box; - width: 100%; + outline: var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline); + outline-offset: var(--ads-v2-offset-outline); }