Problem/Motivation
The font color of Links inside an Accordion inside a Section with mahogany background fails Accessibility color contrast test.


Expected behavior
Contrast should pass.
Originally reported to me by Library website admins on this page:
https://libraries.indiana.edu/libraries-diversity-resources
Steps to reproduce
Put a paragraph with link inside an accordion content inside a section with mahogany background.
<div class="bg-mahogany bg-dark">
<div class="accordion" data-accordion="test-contrast-accordion" role="presentation" aria-multiselectable="true">
<div class="accordion-item is-active" role="heading" aria-level="2">
<h3>
<button class="accordion-title" id="panel-test-contrast-label" aria-controls="panel-test-contrast" aria-expanded="true">
<strong class="accordion-label">
Accordion Label
</strong>
<span class="accordion-icon" aria-hidden="true"></span>
</button>
</h3>
</div>
<div id="panel-test-contrast" class="accordion-content" role="region" data-tab-content="" aria-labelledby="panel-test-contrast-label" aria-hidden="false" style="display: block;">
<div class="text">
<p>Paragraph text here</p>
<p><a href="https://example.com">Link contrast fails</a></p>
</div>
</div>
</div>
</div>
Proposed resolution
Because the nested capability of IU Framework Chunks as implemented in the IU Paragraphs module; we compose rich text blocks inside the accordion content, but at render time the text block that contains the class="text" has no knowledge that it is inside an accordion, so we don't have an easy way to remove the class server side.
Therefore, the proposal is to write a custom CSS rule to override the specificity override.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3275850-2.patch | 885 bytes | jwilson3 |
| ad5d2e00-cd43-11eb-9bbf-39f9641143c9.png | 154.26 KB | jwilson3 | |
| acc49780-cd43-11eb-8aa6-a5c4f722a638.png | 157.27 KB | jwilson3 |
Comments
Comment #3
jwilson3Comment #4
jwilson3Fixed in release https://www.drupal.org/project/iu/releases/2.0.1