Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(Nav): added role presentation to NavItemSeparator #11730

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thatblindgeye
Copy link
Contributor

@thatblindgeye thatblindgeye commented Mar 31, 2025

What: Closes #11717

Opted to not create an interface to expose for NavItemSeparator, as I'm wondering if we should consider deprecating it and just using the Divider component. Right now NavItemSeparator is just a wordier wrapper for Divider, and we're not doing anything special within it. One purpose of keeping this would be to have documentation explicitly about when to set the props to what (assuming we intend for this component to be used as either a separator between NavItems or just anywhere within a Nav; if the intent is only for between NavItems, then we should consider not allowing role or component to be customized).

Additional issues:

@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 31, 2025

Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

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

LGTM just a comment about the TODO.

@@ -188,6 +188,8 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
...props
}: ToolbarItemProps) => {
if (variant === ToolbarItemVariant.separator) {
// TODO: consider removing spread props here so we can update Divider role prop to union of
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have an issue for this? Otherwise should we remove this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated some logic to have the union type on the new prop so removed this comment

@kmcfaul
Copy link
Contributor

kmcfaul commented Apr 7, 2025

I'd be in favor of moving to Divider long term

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - NavItemSeparator - causes axe error inside NavLists
4 participants