Closed wesrowe closed 1 year ago
Some resources for you:
Talking with Josh and investigating the proposed solution, I wanted to document that what has been proposed will not impact FE accordions that have been created in Drupal using the Q&A group or Q&A section content blocks
The main takeaway for this spike is that we should be able to accomplish much more accurate accordion headers by creating a plugin that modifies the dom after the html files are built in content build. Examples of this being done are in src/site/stages/build/plugins/modify-dom
, and the most similar example the developer that works on this could reference would be in src/site/stages/build/plugins/modify-dom/add-id-to-subheadings.js
.
The plugin we create is going to run alongside the other plugins in src/site/stages/build/plugins/modify-dom/index.js
where each html file is stored individually to have these modifications run against them. We are going to need to create logic that finds va-accordion components with the data-template attributes we are targeting (eg collapsible_panel) and works backwards to find the closest previous div with a data-template of paragraph/wysiwyg that contains a header. We can reassign the accordion header levels based on that header.
Description
We need to pull in multiple perspectives (FE eng, accessibility, BE eng) to determine a sustainable, governable way to ensure that accordion headers are set correctly in the hierarchy of the template they appear in.
High-level requirements of the solution:
Acceptance Criteria
CMS Team
Please check the team(s) that will do this work.
Program
Platform CMS Team
Sitewide Crew
⭐️ Sitewide CMS
⭐️ Public Websites
⭐️ Facilities
⭐️ User support