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
Applies accessible accordion to SearchKit, adds fallbacks #28441
Conversation
Makes SearchKits Accordion keyboard-navigable, by swapping to details/summary elements
Makes SearchKit's Accordion keyboard-navigable, by swapping to details/summary elements
Primarily needed in SearchKit - but would support any native use of details/summary where the CMS admin theme doesn't already add this kind of CSS.
(fixes last commit)
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
Tested this. HTML markup looks good and keyboard focusing works nicely for me. But I don't get the open/close icons on default theme. It looks like bootstrap3.css has a rule that is overriding the default There seem to be quite a few extra commits as well, could it be rebased? |
Can see this PR fixes it in Greenwich - but can we not do it below the theme css level? Something like this in civicrm.css? Bit hacky but it's bootstrap3's fault...
|
Thanks for testing. This was once one PR but is now separated, so a bit harder to test, sorry.
civicrm.css would still be overwritten by the theme (so the themes would still need updating). That's why this started outside of the theme path, at |
Tested, is an improvement. I think the test fails are not related. |
Jenkins, test this please |
retest this please |
@artfulrobot - well he hasn't replied but didn't bring it up at the sprint - and the point he raises was discussed by Coleman and I - and I think this is the least worst way to go given the various dependencies. That said, I have a new PR for civicrm.css almost ready around accordions, so maybe it makes sense to remove civicrm.css from this PR and make it just about SearchKit? And have a separate PR for the proposed change to civicrm.css so it's all together (and easier to test once / replicate in a theme)? |
I've merged for the sake of moving things forward! Thanks @vingle! |
Overview
SearchKit builder screen uses two custom angular accordions - this replaces them with
<details><summary>
.Before
Search Kit accordions not accessible/keyboard controllable.
After
They are.
Technical Details
This PR adds some css to stop Bootstrap3 from breaking details/summary, and adds some fallback styling on details/summary as while many modern CMS admin themes will make the summary bold, and change the cursor, older ones don't.
Technical Details
There is a small UI change as the accordion previously used fieldset/legend.