-
Notifications
You must be signed in to change notification settings - Fork 20
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
Govspeak styling doesn't match semantics #3576
Comments
Hi @selfthinker - could you please provide an example URL? |
You can use the Govspeak Converter to see the problem.
Examples of H1s not looking like H1s
Examples of H4-H6 looking like H3
## Examples of emphasised text I couldn't find any examples so far. But I've seen them. |
I managed to find examples of emphasised text as well now:
It's best to make them visible to easily see them on the page, rather than trawling through the source code. I use a userstyle for that. |
Some Govspeak elements don't look like what they are.
Headings
Level 1 headings
H1s are generally styled like paragraphs, so don't look like headings at all.
That's intentionally done because, as the code comment says:
Level 4-6 headings
Something similar is happening with H4s, H5s and H6s.
They all look like H3s (except H5s and H6s don't have a top margin) for similar reasons:
Why it's a problem
While H1 and H4-H6 are indeed discouraged, publishers do use them.
And when they get used, they show a visible heading structure that is different from the actual heading structure.
And that is a fail of the WCAG success criterion 1.3.1 (Info and Relationships).
This means that screen reader users and users who change styles (and search engines) will get a different experience than other users.
It also means the heading structure could be confusing for people who can see the visuals.
That could be solved by changing the styles to match the semantics (in this repo).
If you wanted to re-introduce some kind of styling that still discourages publishers from using those heading levels, it would need to be done differently.
Or this could be solved (at least for future occurrences) on the publisher side by not allowing those heading levels in the content when a page gets published.
While styling it wouldn't fix that part of the problem, it at least makes the problem visible and seeing users would get the same information.
Italics
Text emphasized with
em
(or*italics*
and_italics_
in Govspeak) doesn't show any styling at all.That is also intentional for similar reasons as italics are discouraged.
But because publishers do use them, they are in the code, just not visibly styled.
This is technically also a WCAG 1.3.1 fail, although it has hardly any practical implications as most (or all?) screen readers don't read italics/em differently.
This would still affect users who change styles, but is not likely to have a significant impact.
The text was updated successfully, but these errors were encountered: