Problem/Motivation

RefreshLess does not do a full page load when following links. This presents a number of accessibility challenges.

Remaining tasks

API changes

Unknown.

Data model changes

None expected.

Original report by andrewmacpherson

I took RefreshLess for a spin with some screenreaders. Feedback to follow....

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

When a page updates via RefreshLess, the <title> does not update.

If a user switches to another window or tab (say to do something in their word processor) they may have difficulty finding their way back to the correct browser tab.

andrewmacpherson’s picture

A screenreader doesn't announce that the page has changed, because no full-page load has taken place.

Testing with ChromeVox:
Normally when clicking a link to a new page, ChromeVox makes a special noise when the link is activated, then another special noise to signify a new page loaded, then announces new page title.

With RefreshLess, activating a link causes the link-activation noise, then repeats the name of the link. The new "page" is not announced, and the the keyboard focus shifts to the site-name (home) link.

andrewmacpherson’s picture

Testing with Firefox, Windows 8.1, NVDA 2016.1 (default NVDA settings, I never fiddle with them).

Normally, following a link cause the new page title to be announced.

With RefreshLess there is no audio feedback. The page content changes, but the title isn't announced. NVDA doesn't make many special noises for events.

andrewmacpherson’s picture

Come to think of it the page title not changing could cause problems for anyone who refers to the window/tab title, not just screenreader users.

Added #2695773: Update HTML title element when following RefreshLess links

andrewmacpherson’s picture

Title: Screenreader accessibility with Refreshless module. » [META] improve accessibility of Refreshless module.
Issue summary: View changes

Added #2695777: Announce new content to screenreader users when navigating using RefreshLess.

Changing this to a meta-issue, updating title and summary.

andrewmacpherson’s picture

Issue summary: View changes
mgifford’s picture

I'm very interested in hearing more about this and BigPipe accessibility issues.

wim leers’s picture

wim leers’s picture

Also, that's not even an accessibility issue, it's necessary for this to work correctly at all. But this is an alpha release of a prototype. Please bear with us :)

andrewmacpherson’s picture

Thanks Wim. No worries, I understand it's very new. I was keen to try it with a screenreader because I expect it to be a popular module that site builders just enable-and-forget.

wim leers’s picture

That's the ambition :)

mgifford’s picture

Yup. I'm with @andrewmacpherson seems like there is a lot of potential here. As far as BigPipe, I was just following "Combined with the BigPipe module (which offers significant improvements for the initial page load), this should make just about any Drupal site feel significantly faster." from the project page. I have reached out to Facebook, but haven't heard back from them... I should just go bug Jesse and get her to give me the low-down.

wim leers’s picture

Oh, right. I misread! Sorry :)

+1 to all that.

andrewmacpherson’s picture

jessebeach’s picture

The history API with push/popState might cause a screen reader to recognize a page transition:

https://developer.mozilla.org/en-US/docs/Web/API/History_API

wim leers’s picture

Jesse is here!! \o/

Jesse, this already uses the History API. And see the link at #2695777-7: Announce new content to screenreader users when navigating using RefreshLess which points out that there are also big accessibility problems with Turbolinks itself. Which suggests BaseCamp has poor accessibility.

wim leers’s picture

Status: Active » Fixed

#2695777: Announce new content to screenreader users when navigating using RefreshLess has landed. AFAICT that means all accessibility issues have been addressed.

andrewmacpherson’s picture

Issue summary: View changes

There a few more things to do, been meaning to check in and write them up. Sorry, they went to the back of my mind...

1. Focus behaves unpredictably. Let's say we follow a link in the main menu. It's still there after the page is updated, and focus remains there. But if we follow a link which doesn't exist on the resulting page (e.g. a link in main content) then focus ends up... somewhere. Often focus goes to the site logo link.

I propose we programmatically shift focus back to the start of the body element after following a link. This is where focus would be if we were loading the page for the first time in entirity (or Refreshless wasn't enabled). Pressing TAB for the first time would bring the skip-to-main-content link into focus.

2. The viewport didn't shift - but I see this has been fixed with a scrollToTop() method in the latest code, and it's behaving well. Nice!

3. Let's document the accessibility. From personal experience of talking about accessibility at dev meetups, it's commonly thought that Ajax or single-page apps are inaccessible. It would be good to let module evaluators know what has been addressed so they can enable it with confidence.

andrewmacpherson’s picture

Status: Fixed » Active
wim leers’s picture

I propose we programmatically shift focus back to the start of the body element after following a link. This is where focus would be if we were loading the page for the first time in entirity (or Refreshless wasn't enabled). Pressing TAB for the first time would bring the skip-to-main-content link into focus.

Makes sense!

The viewport didn't shift - but I see this has been fixed with a scrollToTop() method in the latest code, and it's behaving well. Nice!

Yep :) In #2713499: When navigating to a new page, it should be scrolled to the top + navigating to a fragment on another page broken in Firefox.

Let's document the accessibility. From personal experience of talking about accessibility at dev meetups, it's commonly thought that Ajax or single-page apps are inaccessible. It would be good to let module evaluators know what has been addressed so they can enable it with confidence.

Great plan!

Wanna open child issues for 1 and 3?

andrewmacpherson’s picture

Will do. The issue queue is looking very green now!

wim leers’s picture

It is :)

andrewmacpherson’s picture

andrewmacpherson’s picture

wim leers’s picture

Thanks!