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

Improve accordion with summary line semantics and presentation when JS loads but CSS doesn't #2327

Closed
1 task
Tracked by #1706
hannalaakso opened this issue Aug 26, 2021 · 5 comments
Closed
1 task
Tracked by #1706

Comments

@hannalaakso
Copy link
Member

hannalaakso commented Aug 26, 2021

What

We should consider the semantics and presentation of the accordion with the summary line if the CSS fails to load and JS doesn't. As was pointed out at the accessibility clinic, this is what a screen reader user will hear when navigating the component.

This is also unlikely to be considered a good arrangement of content:

“If you showed this to a content designer and said ‘is this good content for a button’, I’m pretty sure they would say it’s not.”

This is related to #2336 - changing the design so that the button doesn't contain the summary line is likely to fix this issue.

If we don't change the design, the visual presentation when JS loads but CSS doesn't could be improved by not transforming the sections to buttons if CSS hasn't loaded - but this is will not help with the semantics when JS does load.

Why

We should ensure that the component follows good practise and makes sense semantically. Also, in the somewhat edge case where JS loads but CSS doesn't, the buttons end up with a large amount of content that isn't visually ordered.

Who needs to know about this

Developer, designer

Done when

@hannalaakso hannalaakso added the awaiting triage Needs triaging by team label Aug 26, 2021
@hannalaakso
Copy link
Member Author

New design

Screenshot 2021-08-26 at 13 57 12

Current design

Screenshot 2021-08-26 at 13 57 51

@hannalaakso hannalaakso changed the title Improve accordion presentation when JS loads but CSS doesn't Improve accordion with summary line semantics and presentation when JS loads but CSS doesn't Sep 2, 2021
@hannalaakso
Copy link
Member Author

hannalaakso commented Sep 20, 2021

General improvements

We're going to mitigate against related issues raised at the accessibility clinic, see 'Next steps' #2295 (comment) for full write up.

Improve the semantics of the summary in the button by adding punctuation

Another thing we should try to do is to insert a comma after the summary line in the markup. This is because we had the slightly unexpected (but very logical) feedback from the accessibility clinic that the punctuation symbol which was originally introduced to improve NVDA announcements (83c8b57 - if the link breaks with rebasing, it's the commit titled "Add pause") also improves the semantics of the button text in general by dividing up its content thematically, as demonstrated here:
Screenshot 2021-09-20 at 14 47 57

Next steps

I'm going to leave this issue open for now so that we can track the work to:

  • add a comma character after the summary line markup with JavaScript, and test that change in screen readers
  • check if we can remove the non-breaking space character before the existing comma (as seen in the above screenshot), it seems redundant

@hannalaakso hannalaakso self-assigned this Sep 20, 2021
@vanitabarrett vanitabarrett removed the awaiting triage Needs triaging by team label Sep 24, 2021
hannalaakso added a commit that referenced this issue Sep 27, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
hannalaakso added a commit that referenced this issue Oct 5, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
@hannalaakso
Copy link
Member Author

hannalaakso commented Oct 5, 2021

This now renders as the following which is a slight improvement:

Screenshot 2021-10-07 at 17 38 53

@hannalaakso
Copy link
Member Author

Reviewed by @vanitabarrett, moving to done.

hannalaakso added a commit that referenced this issue Oct 13, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
hannalaakso added a commit that referenced this issue Oct 13, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
hannalaakso added a commit that referenced this issue Oct 27, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
hannalaakso added a commit that referenced this issue Nov 1, 2021
Insert a comma after the summary line in the markup, similar to the punctuation inserted after the heading.

The GDS accessibility clinic gave us the feedback that the punctuation symbol which was originally introduced to improve NVDA announcements also improves the semantics of the button text in general by dividing up its content thematically. See #2327 (comment)
@hannalaakso
Copy link
Member Author

In addition, the decision to add the commas in was based on a previous investigation done by GOV.UK Publishing Frontend: https://accessibility.blog.gov.uk/2017/12/18/what-working-on-gov-uk-navigation-taught-us-about-accessibility/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants