-
Notifications
You must be signed in to change notification settings - Fork 7
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(AsideHeader, Logo)!: make actions accessible with keyboard #305
Conversation
Preview is ready. |
Playwright Test Component is ready. |
{logo} | ||
</a> | ||
))} | ||
{hasWrapper ? wrapper(button, Boolean(compact)) : 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.
The button is not suitable for all cases. When clicking the button, unnecessary visual effects occur. In addition, there may be uses of wrappers that look at the node markup. In the major version, we plan to improve this component
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.
So, I've replaced the Button element with a native tag. This removes the clicking visual effects and still keeps the element tabable.
This time, however, I had to retake a couple of screenshots (Footer and MobileFooter). There seems to be no visual difference in Storybook, including Safari, but there is a slight logo shift in Playwright screenshots for some reason.
Before: https://preview.gravity-ui.com/navigation/?path=/story/components-mobilefooter--showcase
After: https://preview.gravity-ui.com/navigation/305/?path=/story/components-mobilefooter--showcase
@@ -103,6 +116,18 @@ $block: '.#{variables.$ns}composite-bar-item'; | |||
height: 100%; | |||
cursor: pointer; | |||
|
|||
background: none; |
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 we move the duplicate code into a mixin?
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.
Great catch, thank you! Fixed.
@@ -10,12 +10,13 @@ import './Logo.scss'; | |||
const b = block('logo'); | |||
|
|||
export const Logo: React.FC< | |||
LogoProps & {compact?: boolean; buttonClassName?: string; buttonWrapperClassName?: string} |
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.
This is breaking change. Please retarget your PR to branch v3
. Also message for commits with breaking changes should be starts with feat!
07901f4
to
01b091e
Compare
…fix-aside-header-tabbable
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en