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

Breadcrumbs should not automatically add aria-current="true" to last item #6561

Open
rmgryan opened this issue Jun 18, 2024 · 3 comments
Open

Comments

@rmgryan
Copy link

rmgryan commented Jun 18, 2024

Provide a general summary of the issue here

Consider a use case where Breadcrumbs are used with fields like aria-current="step" like on a checkout page. The current implementation automatically assumes the most common use of breadcrumbs and sets the final item to current and disabled even though that does not fit all valid use cases of breadcrumbs.

🤔 Expected Behavior?

Users should be able to specify isCurrent and isDisabled directly instead of as renderProps. This gives the user full control over Breadcrumb rendering instead of being stuck with default implementation.

😯 Current Behavior

Breadcrumbs render the last item automatically as current and disabled.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/peaceful-voice-696lzf

Version

1.2.1

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Other

If other, please specify.

No response

What operating system are you using?

Windows, Max, Linux

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@snowystinger
Copy link
Member

snowystinger commented Jun 18, 2024

That sounds more like a steplist which has some pretty different behaviors. We've started one in our React Spectrum implementation along with some early hooks.
https://github.com/adobe/react-spectrum/tree/main/packages/%40react-spectrum/steplist/src
https://github.com/adobe/react-spectrum/tree/main/packages/%40react-aria/steplist

They aren't ready for docs yet, they are very early stage. Feedback is welcome on it though.

@rmgryan
Copy link
Author

rmgryan commented Jun 18, 2024 via email

@snowystinger
Copy link
Member

I found this issue w3c/aria-practices#92 with a couple good points/distinctions. So I'm not sure any of the existing patterns fill it yet. Both Tabs and Breadcrumbs seem to come close.

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

No branches or pull requests

2 participants