-
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 lists from summary list action links #1956
Conversation
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.
Tested and it looks good to me.
(+ Good call adding tests for the section actions)
spec/components/summary_list_spec.rb
Outdated
edit: { | ||
href: "#edit-title", | ||
data_attributes: { | ||
gtm: "edit-title", |
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 wonder if it makes sense to also check for data attributes when testing that the actions are rendered as a list.
Since there is another test that checks that they're rendered with data attributes when they are alone, is it necessary to also have that in this test?
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.
Good shout, removed.
c5a7f20
to
7d421bd
Compare
- when the summary list has more than one action i.e. edit and delete, it makes sense for them to be contained within a list inside the DD - when there is only one action, there is no need for a single item to be contained in a list - this was raised as an accessibility problem in a recent audit of accounts
- when the summary list has more than one action (at the top of the component) i.e. edit and delete, it makes sense for them to be contained within a list - when there is only one action, there is no need for a single item to be contained in a list - add tests for this functionality, as seem to be previously missing - this was raised as an accessibility problem in a recent audit of accounts
7d421bd
to
dc094eb
Compare
What
Change how the edit/delete links are rendered in the summary list component. They were added inside a list, even if there was only one link. This change only renders the links inside a list if there is more than one of them.
This change applies to the links that can appear at the top of the component as well as the similar links that can appear on each row.
Why
This was highlighted in a recent accessibility audit where only one link was present in a summary list component. A single link (already in a DD element) doesn't need wrapping in a list.
Visual Changes
None. But here's an illustrative screenshot.
Trello card: https://trello.com/c/lNkwruEi/647-fix-accessibility-issues-raised-by-dac