Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Card component #627

Merged
merged 36 commits into from
Sep 25, 2020
Merged

Add Card component #627

merged 36 commits into from
Sep 25, 2020

Conversation

davidhunter08
Copy link
Contributor

@davidhunter08 davidhunter08 commented Sep 2, 2020

What

Add new card component to supersede the existing promo and panel components.

Why

The panel and promo were two components in the NHS.UK frontend that did not have guidance in the service manual. They both also shared a lot of the same structure and design. This confused users of the design system, with people not knowing when and how to use the components.

There was also an accessibility issue with the content of the promo component being all contained within a link (anchor tag) causing a difficult experience for screenreader users. We have fixed this issue and combined the two components into one new (card) component.

Further detail

Variants include:

Basic card

Screenshot 2020-09-04 at 09 35 23

Clickable card

Screenshot 2020-09-04 at 09 35 32

For cards that contain a single link, the hit area for that link can be made to wrap the entire card.

We avoid wrapping an entire card in an anchor tag as this can be a difficult experience for a screen reader user.

Card with an image

Screenshot 2020-09-04 at 09 35 44

Card group

Screenshot 2020-09-04 at 09 35 02

Feature card

Screenshot 2020-09-09 at 08 41 27

Checklist

@davidhunter08 davidhunter08 force-pushed the feature/card-component branch 3 times, most recently from a06e8a4 to 536e6a5 Compare September 22, 2020 18:15
@davidhunter08 davidhunter08 changed the title Card component Add Card component Sep 25, 2020
@davidhunter08 davidhunter08 merged commit 2a0932a into master Sep 25, 2020
@davidhunter08 davidhunter08 deleted the feature/card-component branch September 25, 2020 16:08
This was linked to issues Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nhsuk-link--no-visited-state modifier Create card component
3 participants