Comments (1)
An interesting, related point of difference compared to govuk-frontend is that we place focus on the first h1 in the page whereas govuk-frontend places focus on the main wrapper.
They then have a class like this which is added by the JS, to remove the outline:
.govuk-skip-link-focused-element {
&:focus {
// Remove the native visible focus indicator when the element is programmatically focused.
//
// We set the focus on the linked element (this is usually the <main> element) when the skip
// link is activated to improve screen reader announcements. However, we remove the visible
// focus indicator from the linked element because the user cannot interact with it.
//
// A related discussion: https://github.com/w3c/wcag/issues/1001
outline: none;
}
}
While ours is hardcoded to the h1, the govuk-frontend one is more flexible and allows skip links that go to other places in the page. We have a couple of pages with more than one skip link on 111 online so this flexibility would be a useful addition.
My tendency would be to align ourselves with govuk-frontend here and drop their component in wholesale, but we would need to bottom out why the decision was made to focus the h1 instead of the main element. I had a look through the git history and seems to have always been this way since 2018 (See e58d885).
@mcheung-nhs what are your thoughts? Is the h1 behaviour significant, or just an arbitrary difference?
from nhsuk-frontend.
Related Issues (20)
- Target Size issue for the links in the A to Z navigation section
- Continue button auto focuses to wrong element on iOS 17 voiceover HOT 2
- Various elements do not meet AAA Enhanced target size HOT 1
- Footer copyright is not right aligned HOT 1
- Input prefix/suffix overflows containers with large font sizes HOT 2
- Action links rely on colour to convey meaning HOT 1
- Link vs body text colour contrast HOT 1
- Dashes in a Contents list have insufficient contrast HOT 1
- Ticks on checkboxes inside details element not rendering correctly HOT 1
- Improve line spacing on summary list
- Component JS files are only available in ESM syntax
- Missing style for nhsuk-list--border
- Allow copyright statement in footer to be set via Nunjucks macro HOT 1
- Error summaries should only be programatically focusable, not keyboard focusable HOT 1
- Label bottom margins are too large
- Order of imports affects styling for checkboxes and radio labels HOT 1
- Bug: inset text requires html option to be uppercase
- EPIC: Explore rebuilding NHS.UK frontend directly from GOV HOT 9
- Top padding not applied to fieldset legends when they appear after a paragraph. HOT 4
- Back links - probably shouldn't have visited colour styles when hovered. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nhsuk-frontend.