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

Accessible page heading #809

Merged
merged 5 commits into from
Sep 29, 2017
Merged

Accessible page heading #809

merged 5 commits into from
Sep 29, 2017

Conversation

philsherry
Copy link
Contributor

Problem

The current design pattern seems like it could be built a little better.
The page title reads "Contacting you — GOV.UK elements",
which isn't how the h1 reads. Having a span in the h1 gives
differing results, depending on the assistive technology used.

Example Screenshot

screen shot 2017-09-27 at 10 47 39

Solution

This new version splits the page name (h1) and the section name (p) –
which are now in the correct source order – and then positions the section
name above with CSS. This keeps the pattern visually identical, but brings
added accessibility wins.

The user can skip to the first header and they'll hear just the page header. If they then key through the page, they'll hear which section they're in.

Example Screenshot

screen shot 2017-09-27 at 10 47 39

Phil Sherry and others added 5 commits September 27, 2017 10:17
The current design pattern seems like it could be built a little better.
The page title reads "Contacting you — GOV.UK elements",
which isn't how the `h1` reads. Having a `span` in the `h1` gives
differing results, depending on the assistive technology used.

This new version splits the page name (`h1`) and the section name (`p`) –
which are now in the correct source order – and then positions the section
name above with CSS. This keeps the pattern visually identical, but brings
added accessibility wins.

The user can skip to the first header and they'll hear _just_ the page header. If they then key through the page, they'll hear which section they're in.
@rpowis
Copy link
Contributor

rpowis commented Sep 29, 2017

Good stuff. Thanks @philsherry. I've updated from master for you 👍

@rpowis rpowis merged commit 0c414e9 into master Sep 29, 2017
@rpowis rpowis deleted the page-header branch September 29, 2017 07:48
hmrc-web-operations pushed a commit that referenced this pull request Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants