cisagov / get.gov

The website for the .gov registry
https://get.gov
Other
15 stars 2 forks source link

255: Add anchor links to headings #296

Closed erinysong closed 4 months ago

erinysong commented 4 months ago

Ticket

Resolves #255

Changes

Accessibility Anchor link text aligns closely with actual header text. Anchor link format matches the same style as MDN and HTTP Archive.

Miscellaneous Notes

Context for reviewers

Setup

Sandbox testing Anchor links can be tested on pages populating the Help page, About page, and Domains page.

Local testing Test that the above sandbox testing also succeeds in the local environment.

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

Ensured code standards are met (Original Developer)

Validated user-facing changes (if applicable)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

Ensured code standards are met (Code reviewer)

Validated user-facing changes as a developer

Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

As a designer reviewer, I have

Verified that the changes match the design intention

Validated user-facing changes as a designer

Screenshots

erinysong commented 4 months ago

@rileyorr Thank you for the feedback and that's a great suggestion on the contraction words! It's a light change from just editing the link name of those specific headers, so I can push a change right now to update those!

erinysong commented 4 months ago

Just pushed an update to our headers with contractions! In case it's helpful to put it here, if we want to customize the URLs for headers, we would format them using the following:

Before: Default Header ## Header Name

After: Customize Header URL ## Header Name {#custom-url-name}

This is the standard way to change URL's in markdown, and the library we use to generate anchor links for our headers also accepts this format to infer that we want to override any default anchor link formatting for a header