- From: Guy Hickling <guy.hickling@gmail.com>
- Date: Thu, 7 Mar 2024 23:41:53 +0000
- To: WAI Interest Group discussion list <w3c-wai-ig@w3.org>
- Message-ID: <CAAcXHNLrboJFFtN36kRRGSE6akfp5CqzMzxixC+xwdXPp+Nydg@mail.gmail.com>
Since this appears to be a Single Page Application, as the others have said, then the "Next Page" button (or link) at the end of each page must call some JavaScript to refresh the page (instead of loading a new page as a normal website would do). Even if the Next Page thing is a link with an href (which would normally move on to another page and start at the top), the JavaScript will override it. In SPAs, it is the responsibility of the developer to ensure that, when the page refreshes with the new content, the focus is set to a sensible place. I think that is what is wrong here - that isn't being done correctly, or at least the way you want. If the developer doesn't change the focus position at all, the position will be a bit haphazard, or maybe carry over from where it was before the page refreshed. But from what you say it appears that the same thing happens every time. So I suspect the developer is setting the focus to the #main-content element. (It certainly isn't due to "because the anchor in the URL #main-content' is always there".) If you want the page to start at the top (and thus look to the user as if it is a normal web page, which is often the best way to do it as that is what users expect), then you need to ask the developer to set the keyboard focus to the very top of the page. Then the keyboard user will have the choice of following the skip link to the main content, or go into the header content if that's what they want. Always allow the user to choose. I think what your developer has done is taking that choice away, and forcing them to start on the main content, which is not necessarily what the user wants. Having said all that, your main heading, and all other content that is not part of the header that appears on all pages, should be inside the <main> element. And the #main-content id, which identifies the target for the skip link, should also be on the <main> element. It isn't really good practice to have them on separate elements, because then things happen as in this case, the skip link ends up jumping over stuff which it shouldn't, like the h1 heading in this case. Finally, on a different matter, perhaps you can help me. I took a look at the gov.uk home page recently, for other reasons not connected with this, and I have found half or dozen or so wcag non-compliances and accessibility issues. That is a shame, because it it is otherwise almost fully WCAG compliant - and gov.uk has an excellent a11y reputation to uphold. (And we in the industry would like a page that we can point people to as an example and say that is 100% compliant, and gov.uk should qualify!) Do you have the influence to correct these things? Or can you put me in touch with someone who can? If so, contact me on guy.hickling@gmail.com, and I'll give you/them details of the issues. (I don't really want to add it into the Report this Page facility as I suspect that is a bottomless pit that nothing ever comes out of!) Regards, Guy Hickling Accessibility Consultant
Received on Thursday, 7 March 2024 23:42:09 UTC