-
Notifications
You must be signed in to change notification settings - Fork 17
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
2412 heading sizes in government frontend #3148
base: main
Are you sure you want to change the base?
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.
Nice work on this, the changes look good to me 👍
I agree with your point on the differences between the h3 headings sizes used in the accordion and in govspeak, likely something that needs to be fixed in govspeak directly, we also an issue in the publishing components gem relating to the govspeak heading sizes - alphagov/govuk_publishing_components#3576
@davidtrussler @MartinJJones Effectively the manual is a book called “Employment Status Manual” but the page is the chapter about updates and the chapter title is more important. The H1 is one of the ways to orient screenreader users and things like search engines and disambiguate the pages. We generally try to start headings with the h1 first, but it’s not a WCAG fail if we don’t do that - see example 2 here: I don't know if you might need to revisit the other piece of work referenced in light of this info. There's no problem with applying relevant heading sizes, eg govuk-heading-m to the headings, though. I think that although the accordion doesn't currently accept a font size change, that's only because we haven't needed to before. We can extend that component to add the necessary class to the span, leading to something like |
2d971d2
to
4803c8f
Compare
@maxgds Thanks for that - makes sense. I've updated this a bit (reflected in the screenshots and stuff in the "changes" column) to hopefully address it in line with what you are saying, if I have understood correctly. In essence this is to change the top heading to an |
Thanks for the reworking. I think it is good that we've brought consistency to the way the H1s are shown, but it might need to be checked with content people to ensure that they're happy with the change to the Census dates format. Although we use a "-" in the The font size changes outside of the "banner" (for want of a better term) are what was most important here. I can see you've adjusted the banner heading font to match. In discussion with Anika she felt that what was inside the banner was different enough from the body copy that it didn't need to change size, and now you've changed it I think it does look a bit offbalanced. I'd check that change with a designer and see what they prefer. What's important is that the structure of the page is comprehensible both for screenreader users and sighted users - you can instinctively tell that the banner content is different from the rest of the page, almost a chunk of metadata, and the structure from there onwards flows with the sizes making sense, while the screenreader user gets a similar understanding from the h2 preceding the h1, and the heading levels being appropriately labelled. |
59a745a
to
0511806
Compare
Trello
By way of an investigation into heading sizes, and a suggested way of dealing with inconsistencies and accessibility issues, I have made some small suggested changes to heading levels and sizes to make the three manuals headings consistent, based on the design here.
Initially this brought two of these ("Content design: planning, writing and managing content" and "Employment Status Manual") into line with the recently updated "Complete the school census" page.
This became problematic though because the
<h3>
elements on the two pages changed here are part of the accordion component and cannot (or maybe should not) be changed in terms of the font size. My feeling is that it should not be a problem to have different sized<h3>
s across these pages since some of those are functioning as part of the accordion.<h2>
and font size reduced to 27px<h1>
("Updates: Content design: planning, writing and managing content") updated (slightly) to align content with page title<h2>
("2023") reduced font size from 36px to 27px<h2>
and font size reduced to 27px<h1>
("Updates: Employment Status Manual") updated to align content with page title<h2>
("2023") reduced font size from 36px to 27px<h2>
and font size reduced to 27px<h1>
("Census dates") updated to align content with page title<h2>
("2023 to 2024 census dates") changed from 24px to 27px