digitalgov.gov
digitalgov.gov copied to clipboard
Fix glossary header bug
Summary
Guide pages that display a summary-box
component also display the Glossary h2
when it should not be visible.
glossary.html
is unnecessarily rendered on guide pages that don't use a glossary.
See guides/dap/common-questions-about-dap
Preview
Solution
- Add a conditional check to display
glossary.html
when.Parent.Params.glossary
is true. - If the
summary-box
component is used on a page with aglossary
component enabled, then don't display the Glossaryh2
. - Hide the Glossary
h2
insummary-box.js
How To Test
- Visit guide page and should not see glossary header in
summary box
when glossary is not enabled. - Visit guide page and should not see glossary header in
summary box
when glossary is enabled.- set
summary_box: true
oncontent/guides/hcd/discovery-concepts/present.md
on your local machine
- set
- Visit guide landing page and should not see glossary header in
summary box
when glossary is enabled.- set
summary_box: true
oncontent/guides/hcd/introduction/_index.md
on your local machine
- set
What To Test
-
glossary.html
is not rendered whenglossary
field is not set-
dg-glossary__container
is not present in markup
-
-
summary-box
component does not display Glossaryh2
whenglossary
field is not set (Step 2 above) -
summary-box
component does not display Glossaryh2
whenglossary
field is set (Step 3 above)
Dev Checklist
- [x] PR has correct labels
- [x] A11y testing (voice over testing, meets WCAG, run axe tools)
- [x] Code is formatted properly
:mag: Preview in Federalist
@nick-mon1 removed trello link.