-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: added focus styles for interactive elements #576
Conversation
Preview is ready. |
e353eeb
to
56d663b
Compare
60b40aa
to
28ebc66
Compare
664b9b9
to
d553cae
Compare
71ce27c
to
53b970b
Compare
2fe79b8
to
228905d
Compare
@@ -60,6 +60,12 @@ $block: '.#{$ns}content-layout-block'; | |||
padding: $indentXL; | |||
} | |||
|
|||
&_theme { | |||
&_dark { | |||
--g-color-line-focus: var(--g-color-text-light-primary); |
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.
What color is default for --g-color-line-focus
in uikit and why can't we use it?
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.
Ok, let's use default focus color in page-constructor
@@ -251,7 +251,7 @@ export const SliderBlock = (props: WithChildren<SliderProps>) => { | |||
return ( | |||
// To have this key differ from keys used in renderDot function, added `-accessible-bar` part | |||
<Fragment key={`${index}-accessible-bar`}> | |||
{slidesCountByBreakpoint > 1 && ( | |||
{slidesCountByBreakpoint > 0 && ( |
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.
why did you change the value? Could it break something?
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.
I change it because when we have slidesCountByBreakpoint === 1
the accessible bar didn't render and one was unable to find it vis screenreader
|
||
return ( | ||
slidesCountByBreakpoint > 0 && |
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.
Something wrong with a slider. I can tab trough cards and then if I click to the arrow it doesn't work right
https://disk.yandex.ru/i/7dRgmxUNMis7iA
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.
Yep, this is an issue I think came from react-slick, I didn't manage to find a solution better than wrap each slide with inert
attribute. But it may be risky, as slides not visible for the user, will be unavailable for focus
@@ -391,6 +391,7 @@ export const ReactPlayerBlock = React.forwardRef<ReactPlayerBlockHandler, ReactP | |||
onProgress={onProgress} | |||
onEnded={onEnded} | |||
aria-label={ariaLabel} | |||
previewTabIndex={-1} |
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.
What does it mean?
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.
It means that preview image will not be focusable with Tab. At the same time we have on preview image play button, which is also accessible via Tab. I thought it would be sufficient to have it focusable
@@ -259,7 +264,15 @@ $block: '.#{$ns}hubspot-form'; | |||
p { | |||
color: var(--g-color-text-primary); | |||
@include text-body-2(); | |||
margin: 0 0 20px; | |||
margin: 20px 0; |
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.
Can you use variable instead of 20px?
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.
Yep
Introduced focus variables:
|
@@ -44,19 +44,24 @@ const FullscreenImage = (props: FullscreenImageProps) => { | |||
onClick={openModal} | |||
style={imageStyle} | |||
/> | |||
<div className={b('icon-wrapper', {visible: isMouseEnter})} onClick={openModal}> | |||
<button |
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.
did we reset button styles?
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.
yep
<div | ||
className={b('media-wrapper')} | ||
onClickCapture={openModal} | ||
onMouseOver={onShowFullScreenButton} |
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.
:hover in css doesn't suite this case?
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.
suits, rewrote with pseudoclasses
@@ -71,14 +71,14 @@ const PriceDetails = (props: PriceDetailsExtendProps) => { | |||
|
|||
const getFoldableTitle = () => { | |||
return ( | |||
<div | |||
<button |
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.
did we reset button styles?
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.
also yes
Release-As: 4.24.0
262fc72
to
0c6794e
Compare
No description provided.