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(@clayui/css): LPD-40160 Adds menubar-primary for CMS Product Menu variant #5898

Merged
merged 13 commits into from
Dec 18, 2024

Conversation

pat270
Copy link
Member

@pat270 pat270 commented Nov 27, 2024

https://liferay.atlassian.net/browse/LPD-40160

vertical-bar-primary

I'm sending this as a draft because we have a problem with the accordion headers. They can only be button and in some of the headers we have nested plus buttons. Having a button nested in a button violates:

Phrasing content, but there must be no interactive content descendant and no descendant with the tabindex attribute specified.

from the w3c spec. I need some help figuring out which component we should place <div role="button"> to make our markup valid.

@ethib137
Copy link
Member

@marcoscv-work any recommendations for this one?

@marcoscv-work
Copy link
Member

Hey guys @ethib137 @pat270 if we use role="menuitem" it should work fine.
An example here: https://codepen.io/marcoscv/full/NWQbJbx
You can change the for a button and validate with Axe or Wave. it should be valid.

@@ -52,6 +52,40 @@ export const Link = React.forwardRef<
},
ref
) => {
if (showIcon) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change here will probably break tests in DXP due to button being changed to div.

@ethib137
Copy link
Member

Hey @pat270, what's the status on this one?

Also, it looks like keyboard navigation for vertical nav is broken by this PR.

@pat270 pat270 marked this pull request as ready for review December 18, 2024 04:22
@pat270
Copy link
Member Author

pat270 commented Dec 18, 2024

@ethib137 I wasn't able to fix the the keyboard navigation. I had to rearrange the markup due to button in button React error. I believe the keyboard navigation isn't working for this because the text is nested inside other elements.

menubar-primary

@matuzalemsteles
Copy link
Member

I might take a look at it this week if I can't get it moving @pat270.

@ethib137
Copy link
Member

@matuzalemsteles and @pat270 we need this ASAP. Please prioritize getting this fixed and released. Thanks guys.

@pat270
Copy link
Member Author

pat270 commented Dec 18, 2024

@ethib137 keyboard navigation works for the other vertical navs. It's only broken for the primary variant.

@ethib137
Copy link
Member

That's odd... we need it to work for primary too.

@matuzalemsteles
Copy link
Member

I fixed the navigation bug for primary, it wasn't working because we have a hook that handles navigation for our components but it was only being applied to the old VerticalNav and not to the new variant.

@pat270
Copy link
Member Author

pat270 commented Dec 18, 2024

Thanks @matuzalemsteles! I'll update the tests

@pat270 pat270 merged commit aa3ccd8 into liferay:master Dec 18, 2024
4 checks passed
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