-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
79f0151
to
9b93ef2
Compare
There was a problem hiding this 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.
There was a problem hiding this 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.
a62f03d
to
469520b
Compare
There was a problem hiding this 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 👍
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.