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

Text-alignment #297

Closed
Tracked by #1326
samanthasaw opened this issue Dec 11, 2020 · 36 comments
Closed
Tracked by #1326

Text-alignment #297

samanthasaw opened this issue Dec 11, 2020 · 36 comments
Assignees
Labels
content Goes into the 'Content' section of the service manual style Goes in the 'Styles' section of the service manual

Comments

@samanthasaw
Copy link

samanthasaw commented Dec 11, 2020

What

Align text to the left

Why

Help users read text-based content

What evidence do you have that services across the NHS need it?**

  • Some users use screen magnification. Users with screen magnification at 200% may not see that text is aligned out of the screen and skip a heading
  • In left to right languages, users anchor their eyes to the left after reading each sentence. This is known as reading in a F-shaped pattern. Changing this pattern will cause the user to have to make an effort to find where your sentence starts. Users could be annoyed by the change in pattern, or worse, not understand the content.
  • Advice for layout for users with dyslexia also suggests left-aligning text
  • In the context of health, users need to be able to quickly and easily read and understand content. Misunderstanding or missing content can have a considerable health impact

Anything else

@sarawilcox
Copy link
Contributor

sarawilcox commented Dec 11, 2020

This fits with some of our and GOV.UK's existing guidance, e.g.:

See also:

@davidhunter08 davidhunter08 added the awaiting triage Needs triaging by team label Dec 11, 2020
@sarawilcox
Copy link
Contributor

Thanks @samanthasaw. Have you seen examples of services not doing this?

@samanthasaw
Copy link
Author

Hi @sarawilcox yes we did a usability assessment today of a third party online consultation service. I noticed some of their content was center-aligned. I looked to see if there was anything in the service manual to back up left-aligning content in case we got any push back from them, as we'd recommend they left-align the text

@samanthasaw
Copy link
Author

WCAG 1.4.8 Visual Presentation which concerns justified text:
https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html

It doesn’t specifically mention centred text but does suggest aligning text to the left (or right):
https://www.w3.org/WAI/WCAG21/Techniques/css/C19.html

@mcheung-nhs
Copy link

@samanthasaw
Copy link
Author

Sorry @mcheung-nhs Sara had already added that link in a previous comment so I left it out

@mcheung-nhs
Copy link

Oops - you're right, didn't see that!

@samanthasaw
Copy link
Author

@henocookie
Copy link
Contributor

It's worth considering the different languages used by people using NHS services. For example, Arabic content tends to be aligned from right to left. For example, the Doctoori website, linked to from the NHS.UK Health information in other languages page can be viewed in both English and Arabic. When Arabic is selected, the whole layout of the website changes, for example on the common health questions page.

Doctoori Ar

Doctoori En

@sarawilcox
Copy link
Contributor

Yes, we should probably specify left-aligning for languages that run left to right, like English. And right-aligned for content that runs right to left, like Arabic.

@sarawilcox sarawilcox added content Goes into the 'Content' section of the service manual style Goes in the 'Styles' section of the service manual labels Mar 31, 2021
@sarawilcox
Copy link
Contributor

Align text left for maximum legibility. Avoid right aligning or justifying text.
From GOV.UK Guidance: Accessible communication formats

@sarawilcox
Copy link
Contributor

I think we have enough information here to take this to the next Style Council meeting.

@sarawilcox
Copy link
Contributor

@karlgoldstraw suggests that we'd probably want to cover this under typography: https://service-manual.nhs.uk/design-system/styles/typograph - like a utility class, or a helper.

Also, I think we should mention it under Formatting and punctuation in the content style guide: https://service-manual.nhs.uk/content/formatting-and-punctuation

See this GOV.UK frontend issue: alphagov/govuk-frontend#1824

@sarawilcox
Copy link
Contributor

Another example of right to left is the BBC Farsi (Persian) language page: https://www.bbc.com/persian.

@sarawilcox
Copy link
Contributor

I see that GOV has published new override classes for text alignment: https://github.com/alphagov/govuk-frontend/releases/tag/v3.14.0. Is this the approach we'd take?

@henocookie
Copy link
Contributor

I see that GOV has published new override classes for text alignment: https://github.com/alphagov/govuk-frontend/releases/tag/v3.14.0. Is this the approach we'd take?

Seems sensible. I guess this would be alongside guidance to align text to the left in most instances, as suggested by @samanthasaw in the initial issue?

@samanthasaw
Copy link
Author

@henocookie @sarawilcox Doesn't HTML by default align text and elements to the left? Would the override classes only be for certain elements

@aviangel-NHS
Copy link

I've noticed some of the tab navigation elements sometimes have links to the right of the container. That could be an issue depending on the type of screen magnification software that is being used. Could easily be missed

Tabbed navigation - BMI calculator - Check your BMI

@aviangel-NHS
Copy link

I've heard that some of the NHSuk tools are being reviewed and updated. It's prob worth making sure that none of the content is right aligned and hidden from users using screen magnification.

Screenshot - BMI calculator - Check your BMI - NHS - Please fill in your details - alignment

@sarawilcox
Copy link
Contributor

sarawilcox commented Nov 1, 2021

This is what I'm thinking of putting to the next Content Style Council meeting, early December. We could add it to the Formatting and punctuation page in the content style guide.

Screenshot 2021-11-01 at 12 05 52

@teodorastraianu1 is considering what we need to add to the design system, including a new override class for text alignment.

@samanthasaw for info.

@sarawilcox
Copy link
Contributor

sarawilcox commented Nov 5, 2021

@teodorastraianu1 A question. Some teams may need to support 2 languages at the same time, e.g. English left to right and Arabic right to left. See this page: https://paper.dropbox.com/doc/Multiple-language-support-hSVIJqjyWFVc5N6Irvxnn

In fact, they say: "This is difficult in a responsive design though so alternatives should be explored. " Maybe we should steer clear of this.

@henocookie
Copy link
Contributor

This will be taken to the Content Style Council and Design System Working Group tomorrow (7th December 2021) for discussion to see if there are any objections to progressing forward and publishing the guidance and adding a utility class to nhsuk-frontend

@samanthasaw
Copy link
Author

Style council - left align content.pptx

Slides I presented at the style council on 7 December 2021

@henocookie
Copy link
Contributor

henocookie commented Dec 9, 2021

At the December Design System Working Group session, left-align text was presented by @samanthasaw, @sarawilcox and @henocookie. This was discussed and voted on by the DSWG members.

Key points of discussion:

  • Consider whether the guidance is applicable for clinical facing systems
  • Alignment of components should be a new backlog item, but guidance for left-aligning text seems good to publish
  • Consider where this guidance could also be surfaced in the accessibility guidance section of the service manual
  • Include guidance to not use justified text unless user research shows it would be useful for a particular service

Vote to publish:

12 - Ready to publish now
5 - Needs a little more work
0 - Needs a lot more work
0 - Not right now

Next steps

@sarawilcox
Copy link
Contributor

A weird example of right aligned English and Arabic: https://www.gov.uk/government/publications/instructions-for-covid-19-self-test.ar.

@henocookie
Copy link
Contributor

henocookie commented Dec 15, 2021

I've checked and it appears there is no common example of code editors allowing for right-aligned editing. For example, Apple still uses left-to-right examples of code when showing how to adapt interfaces Internationally to support right-to-left languages, like Arabic.

@henocookie
Copy link
Contributor

henocookie commented Dec 15, 2021

Guidance tweaks pending a content review from @sarawilcox following feedback and next steps agreed after the December 2021 DSWG session.

Guidance in the content style guide

Formatting-and-punctuation-NHS-digital-service-manual

Guidance in the design system

Typography-NHS-digital-service-manual

@henocookie
Copy link
Contributor

Guidance and examples for text-alignment in the GOV.UK Design System: https://design-system.service.gov.uk/styles/typography/#text-alignment-override-classes

@sarawilcox
Copy link
Contributor

Above text for content style guide approved at December Content Style Council. Notes of Style Council meeting to be approved by clinicians.

@henocookie henocookie self-assigned this Jan 11, 2022
@henocookie
Copy link
Contributor

henocookie commented Jan 11, 2022

To do once the nhsuk-frotnend update is released:

  • update the nhsuk-frontend version for the service manual app
  • remove the custom text-alignment CSS in the service manual app

@henocookie
Copy link
Contributor

henocookie commented Jan 13, 2022

Custom CSS in the service manual is now removed. Just awaiting final content tweaks @sarawilcox is working on to be able to release the text-alignment guidance in the service manual

@henocookie
Copy link
Contributor

Closed as the guidance has now been published in v5.7.0 of the NHS digital service manual 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Goes into the 'Content' section of the service manual style Goes in the 'Styles' section of the service manual
Projects
Status: Q4 21-22 - Done
Development

No branches or pull requests

8 participants