Skip to content
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

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

kmenshov
Copy link

@kmenshov kmenshov commented Sep 6, 2024

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

{logo}
</a>
))}
{hasWrapper ? wrapper(button, Boolean(compact)) : button}
Copy link
Collaborator

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

Copy link
Author

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;
Copy link
Collaborator

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?

Copy link
Author

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}
Copy link
Collaborator

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!

@kmenshov kmenshov changed the base branch from main to v3 September 26, 2024 16:05
@kmenshov kmenshov changed the title fix(AsideHeader): make actions accessible with keyboard feat(AsideHeader, Logo)!: make actions accessible with keyboard Sep 26, 2024
@kmenshov kmenshov merged commit 6ce6b99 into v3 Oct 3, 2024
5 checks passed
@kmenshov kmenshov deleted the fix-aside-header-tabbable branch October 3, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants