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
Accordion Convergence #16926
Comments
Update:
Next:
Need:
|
Update:
|
Can we just leverage existing patterns similar to Customizer to address in context needs without breaking encapsulation? I get really concerned when components try to reach out of themselves and make assumptions. Usually leads to unexpected behavior. Would love to understand the approach here. |
The approach I'm adopting at the moment (after some discussion) is to use @reach/descendants, an internal library from Reach UI design system that was developed to manage this exact problem of comunicatin between compound components. Please let me know if you have any thoughts or advices on the matter @brandonthomas |
so is this being used to solve the problem of what is inside the Accordion or for the Accordion to understand what it is itself inside of? |
This solves the problem of knowing the order of child components inside a context. Which is a common problem for components such as Menu, Accordion, List, pretty much any components that normally follow some sort of compount pattern @brandonthomas |
Update:
|
This can probably be part of the accessibility review, just adding a note here that I think it'd be worth using semantic heading and button elements rather than The other thing I'd like to discuss at some point is the arrow key + home/end keyboard interaction. The drawback to implementing arrow key interactions in general is that they remove the default functionality of scrolling the page. On components like a combobox or a grid the benefits outweigh the drawbacks, but I don't think that's true for Accordion, since it's usually used primarily as a container for content. I think it'd be good to have arrow keys + home/end turned off by default, then perhaps have a property to turn them on with some docs language around when it'd be a good idea to do so. I know we'll have an a11y review later, just wanted to dump thoughts in here for future reference 😄 |
Perfect! thx @smhigley! I totally agree with the semantic heading and the button element as default value, and let the user opt-out if wanted. But since there're more opinions on the table, let's wait for the review! |
@smhigley I think now is definitely the right time to go over these things. Way cheaper to call out now. To your point, I don't think there's so many accordions in a page where tabbing becomes unmanageable so I think that default makes sense. @bsunderhus so this is basically to replace needing to pass the count of items through to children via props then? Is that necessary when we have slots and can pass in native props through the root of the component? Either way the children have to either opt into the context here or support props to the root through the component props. Am I understanding this right? |
Uh no, I think I might have missguided you there @brandonthomas . The documentation on reach-descendants is quite a good description actually. Let's take the case of Accordion for example. The state of an The same line of thinking from the |
Here's the sum up of the A11y review
|
Update:
Next up:
|
Hi there. I had come to Fluent's issues to file a request for an accordion component, as I've seen many teams misusing the tree grid component as a stand-in for more appropriate disclosure widgets / accordion components. So I'm very happy to see this in the works and (hopefully?) coming soon! I do have one comment, having read through the thread here, concerning the following:
First, I would submit that not all accordion components require headings - so optionally being able to specify headings would be the ideal here. But per the comment's reasoning not to implement, Voice Over doesn't have a bug with how buttons within headings work, as much as VO has a very particular behavior which is intentional on their end, for how elements are navigated. To that end, I would request that this not be treated as a reason to not implement support for headings. Thank you! |
Thx for the feedback @scottaohara! The implementation will follow WAI-ARIA spec as recommended and use a header with a button by default, but opting-out mechanisms will be provided to ensure that this behavior can be addressed |
Thank you for the response Look forward to the component's release. |
Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. Still require assistance? Please, create a new issue with up-to date details. |
Preparation:
Implementation
link to react-* package folder
Validation
The text was updated successfully, but these errors were encountered: