alphagov / govuk-frontend-docs

Technical documentation for GOV.UK Frontend
https://frontend.design-system.service.gov.uk/
33 stars 11 forks source link

Add explanatory text and improve headings in Sass API Reference #114

Open EoinShaughnessy opened 3 years ago

EoinShaughnessy commented 3 years ago

What

Add explanatory/introductory text under headings in Sass API Reference. Possibly also revise some headings to make them more meaningful to users.

Why

Because of how the Sass API Reference is generated, no explanatory text displays under its headings. This means we are not telling users what the different sections can help them do.

There may also be an impact on accessibility - using headings that do not appropriately describe their related content is a failure of WCAG 2.4.6: Headings and Labels.

For example, would anyone coming to this content for the first time necessarily know what we mean by 'Assets'/ 'Settings' here? 👇🏻 Or even what the 'Sass API reference section' is for, generally?

image

Who needs to know about this

Laurence, Eoin

Done when

*However, the bulk of this work will be in the govuk-frontend-docs repo.

EoinShaughnessy commented 2 years ago

@kellylee-gds I asked the Accessibility Team whether there needs to be content under headings. They said:

It’s not an accessibility fail, but it is a preference for some screen reader users.

Basically, if there’s no content between headings, some users are concerned there is something there that they can’t access

so spend a while trying to get their software to access the ‘thing’ between headings

but when there is no ‘thing’ and it just leads onto another heading, this could cause confusion and waste time

stevenjmesser commented 1 year ago

@colinrotherham Do you know if we'll can continue using SassDoc now that we've switched to Dart Sass? Trying to work out whether this might be resolved by using a different API reference generator or whether we still need to solve the issue.

colinrotherham commented 1 year ago

@stevenjmesser Yeah no blockers continuing to use it

They're after help maintaining the project though:

Locally we use a different SassDoc theme (see screenshot) but it's hidden when deployed to Heroku

These docs render the same SassDoc data

Even if there's no way of adding explanatory/introductory content to the SassDoc data itself, I'm sure we could match up known sections (in the SassDoc data) with content maintained in this repository before it gets rendered

SassDoc default theme
colinrotherham commented 1 year ago

Sounds like https://github.com/alphagov/govuk-frontend-docs/issues/116 is an improvement right away