cfpb / consumerfinance.gov

Django project protecting American consumers
https://www.consumerfinance.gov/
Creative Commons Zero v1.0 Universal
273 stars 110 forks source link

Remove h2s from prepaid agreements #8578

Closed anselmbradford closed 4 days ago

anselmbradford commented 4 days ago

The prepaid agreements have definition lists for each company. The detail pages set these definition terms (dt) as h2s, which includes them in the heading structure. On the search results list they are not h2s, so are not included in the heading structure.

On the details page, the dts are h2s that are set as h4s via CSS, which steps down at mobile. The search result page set these dts as heading-4s, which don't step down at mobile.

I could be wrong, but it doesn't seem like the dts should be heading elements, but instead their parent should be the heading element, which it is (the company name).

Changes

How to test this PR

  1. yarn build and visit http://localhost:8000/data-research/prepaid-accounts/search-agreements/ and compare to production. Resize to mobile.

Screenshots

Before:

Screenshot 2024-09-13 at 3 40 55 PM

After:

Screenshot 2024-09-13 at 3 41 03 PM

Todo