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

Remove title attribute from summary list #1973

Merged
merged 2 commits into from
Mar 15, 2021
Merged

Conversation

andysellick
Copy link
Contributor

What

Remove the title attributes from the links in the summary list component. These are automatically generated based on the link text and the thing they refer to, or passed to the component directly (a change I recently added).

Why

We don't usually use the title attribute for links on GOV.UK, instead relying on visually hidden text within the link text. What's strange is that this component already does this, so the title attribute seems an unnecessary addition, particularly when the original component in the Design System doesn't have title attributes on links - https://design-system.service.gov.uk/components/summary-list/.

There's also evidence that screen readers treat it in various ways. Specifically https://www.deque.com/blog/text-links-practices-screen-readers/ highlights this, and this article https://www.powermapper.com/tests/screen-readers/labelling/a-title/ shows that it can cause problems in 17 screen reader / browser combinations.

Visual Changes

None.

@bevanloon bevanloon temporarily deployed to govuk-publis-remove-sum-lkpmd1 March 15, 2021 10:52 Inactive
@andysellick andysellick force-pushed the remove-summary-list-title branch from 79f0151 to 9b93ef2 Compare March 15, 2021 10:53
@bevanloon bevanloon temporarily deployed to govuk-publis-remove-sum-lkpmd1 March 15, 2021 10:54 Inactive
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a bit of investigation in an attempt to shed a bit of light on how we ended up with this. Content Publisher (then later Collection Publisher), by design, needed a summary component. At the time this was only available as a pattern in the prototype kit. The component was ported from the prototype kit into Content Publisher, where title referred to the section title – it seems that over time this attribute morphed into being used as an HTML title attribute – hence the redundant element.

Happy for this to be removed as we have the visually hidden element.

Copy link
Contributor

@danacotoran danacotoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment, I think it looks good otherwise.

@bevanloon bevanloon temporarily deployed to govuk-publis-remove-sum-lkpmd1 March 15, 2021 15:14 Inactive
@andysellick andysellick force-pushed the remove-summary-list-title branch from a62f03d to 469520b Compare March 15, 2021 15:38
@bevanloon bevanloon temporarily deployed to govuk-publis-remove-sum-lkpmd1 March 15, 2021 15:38 Inactive
Copy link
Contributor

@danacotoran danacotoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the doc with my suggestion 👍

@andysellick andysellick merged commit d8b96f4 into master Mar 15, 2021
@andysellick andysellick deleted the remove-summary-list-title branch March 15, 2021 15:41
@andysellick andysellick mentioned this pull request Mar 15, 2021
This was referenced Mar 17, 2021
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.

4 participants