nhsuk / nhsuk-service-manual-community-backlog

This is a place for digital teams in the NHS to work together and develop the NHS digital service manual.
https://service-manual.nhs.uk/community-and-contribution
62 stars 5 forks source link

Text-alignment #297

Closed samanthasaw closed 2 years ago

samanthasaw commented 3 years ago

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?**

Anything else

sarawilcox commented 3 years ago

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

See also:

sarawilcox commented 3 years ago

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

samanthasaw commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

And https://www.w3.org/WAI/WCAG21/Techniques/general/G169.html

samanthasaw commented 3 years ago

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

mcheung-nhs commented 3 years ago

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

samanthasaw commented 3 years ago

GOV.UK - accessible communication formats, design and layout

henocookie commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

sarawilcox commented 3 years ago

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

sarawilcox commented 3 years ago

@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: https://github.com/alphagov/govuk-frontend/issues/1824

sarawilcox commented 3 years ago

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

sarawilcox commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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.

teodorastraianu1 commented 3 years ago

@sarawilcox No, I don't think we would have to justify (unless I am missing something).

I agree we should probably not mention mixing multiple languages in one page, especially since this is just guidance on text alignment, not on producing content in languages other than English.

teodorastraianu1 commented 3 years ago

This is what we are thinking of adding to the Design System, to the Typography page.

Screenshot 2021-11-05 at 16 33 38

We would also add a code snippet (which @danjohnstonUX is currently working on) and an example of what right-aligned text would look like. We are thinking of using an Arabic example, since that's the use case we recommend right-aligning for. We are thinking of saying "Aligning Arabic text to the right", which would look something like this (needs to be checked by one/a few Arabic speakers to make sure it's a good translation):

image

sarawilcox commented 3 years ago

We're proposing to add something like this to the content style guide as well, on the Formatting and punctuation page. Screenshot 2021-11-01 at 12 05 52

samanthasaw commented 3 years ago

Looks good to me! @teodorastraianu1 @sarawilcox

henocookie commented 2 years ago

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 commented 2 years ago

Style council - left align content.pptx

Slides I presented at the style council on 7 December 2021

henocookie commented 2 years ago

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:

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 commented 2 years ago

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

henocookie commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

henocookie commented 2 years ago

To do once the nhsuk-frotnend update is released:

henocookie commented 2 years ago

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 commented 2 years ago

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