Problem/Motivation
Patch adds display variants to the accordion which are ARIA and 508 compliant.
Also updated info file to be Drupal 11 compliant.
Patch to add classes and form interfaces as well as rendering.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | ckeditor_accordion-provide-accessible-variant-3124167-49-2024-11-15-.patch | 22.19 KB | emptyvoid |
| 2024-08-27-ckeditor_accordion-2_2-accessible-D11.patch | 21.99 KB | emptyvoid |
Comments
Comment #2
emptyvoid commentedComment #3
charles belovTested. Due to existing issues #3468229: Adding accordion to CKEditor toolbar gets error and #3468404: Make CKEditor be forgiving of enabling something that's already enabled, I had to manually remove the definition tags. But it seems this patch has not fully shed the
<dl>tag.Details follow:
I added CKEditor Accordion module to Drupal core in SimplyTest.me and applied this patch.
I believe this patch has been applied, as when I go to /admin/config/content/ckeditor-accordion I see the following setting:
and that is the only selection available. (Is this correct? Would I expect to see the original
<dl>option? Perhaps not if it doesn't meet WCAG.)However, when I go to /admin/config/content/formats/manage/basic_html and drag the accordion icon from Available Buttons to Active Toolbar, I get the following error:
I then removed the definition tags from Source Editing and applied the changes.
However, when I add an accordion to the text body of a page, then save and publish the page, I'm still seeing the
<dd>and<dt>tags, not<div>and<h2>, being output to the anonymously-viewable page, as well as not seeing any ARIA attributes.I didn't change this to "Needs work" in the event there was an error in my workflow. It would be good to have someone else check this out as well.
Comment #4
emptyvoid commentedPlease read the extended "README.MD" as it details additional libraries you'll have to install for it to work.
Comment #5
charles belovAh, if that comment was directed at me then I'm not going to be able to test it. I'm QA not a developer.
Comment #6
emptyvoid commentedAs of version 2.1 now I get the following errors in the JavaScript console
It would appear that the rendering of the input is somehow being overriden and the attributes are being stripped from the rendered accordion. The accordion still renders and the user can interact via keyboard and mouse.
But this error is posted to the console on page load.
Anyone familar with this and or how the new code highjacks the input rendering?
Comment #7
emptyvoid commentedOk created a patch which fixes the client-side error and properly defines the meta data structure of the variant.
Though I've noticed to fix existing accordions I have to manually rebuild each either in a page or block and save it for the rendering to work as expected.
Comment #8
majorrobot commented@emptyvoid -- curious what the difference between this issue and patch and https://www.drupal.org/project/ckeditor_accordion/issues/3124167?