You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main content area has the following markup:
```
<div class="app-pane__content" tabindex="0">
<main>
...
</main>
</div>
```
`div.app-pane__content` has `tabindex=0` to make
it focusable (`div`s are not by default). It is
focusable so keyboard users can scroll it, using
their arrow keys when it is tabbed to. This is
important because the docs' page is split into 2
panes that scroll independently.
`main` is focused when you click the 'skip to main
content' link, at the start of the page, using the
design system skip link component:
https://design-system.service.gov.uk/components/skip-link/
These changes don't try to merge these tags but
rather make the visuals show a single focus style
for both, because users shouldn't care which one
is focused. Both alow you to scroll the pane and
represent the main content area.
This commit also includes a change that removes
the outline from links in the table of contents.
Testing the other changes in this commit, I saw
the outline style from the browser styles applied
to table of contents links. focus-visible styles
are displayed based on browser heuristics, which
seem to kick in when the other changes are
applied. This cancels them on the link without
removing them from the child `<span>`.
it('on mobile-size screens, when the table of contents is open and the escape key is activated, the table of contents should be hidden',function(){
255
+
it('on mobile-size screens, when the table of contents is open and the escape key is activated, the table of contents should be hidden and the main content shown',function(){
235
256
$html.addClass('mobile-size')
236
257
237
258
module=newGOVUK.Modules.TableOfContents()
@@ -244,6 +265,8 @@ describe('Table of contents', function () {
0 commit comments