Problem/Motivation

Creating a view can be a trial-and-error endeavor. Make a change, check the preview, and then keep the change or revert it depending. For a blind user, the effects of a change to a view's definition are not immediately apparent.

Proposed resolution

We can use the Drupal.announce method on the front end to give the screen reader user a summation of the changes to the preview area. Or even just its current state after a change. Is it a list? Well, how many items are in the list? Is it a table? How many rows are in the table? With views, the change to a view often results in either some data or no data. Just knowing that you added one filter too many or of the wrong type and wiped out your results is super helpful.

Remaining tasks

Propose an initial patch.

User interface changes

Screen reader users will have some indication of what their changes to a view's definition did to the result set in the preview.

API changes

None.

#1806308: Review Views JavaScript + generic modals for accessibility

Comments

dawehner’s picture

Views currently don't really has a concept of what changed beside a simple diff of the config file.
We kind of would need a full system to convert that to human language. Is there any other place in core where we do something like that?

jessebeach’s picture

Issue summary: View changes
Status: Active » Needs work
StatusFileSize
new2.65 KB

dawehner, we might be able to put an aria-live="polite" attribute on the container of the preview and have changes to its contents simply read to the user - not intervention needed. We would also add aria-relevant="all" so that DOM changes are announced, not just text changes.

Some documentation on these attributes: https://developer.mozilla.org/en-US/docs/Accessibility/ARIA/ARIA_Live_Re...

AAAANNNNDDDD I tested that approach and it failed :(. VoiceOver never read the updated content and ChromeVox read the content inconsistently.

At the very least, we should clean up the heading structures. Here's a patch to start us off and do just that. Now the preview area has an h2 associated with it.

Bojhan’s picture

Do we atleast inform people that the preview is updated?

If we can't inform them of the specific setting, can't we inform them of the "setting" that they updated affected the preview. Like "Field: Blababa, has been added to the preview" or "HTML Settings changed, and effected the preview"? Not sure how useful that is.

mgifford’s picture

Issue tags: +aria

Nice to see this patch in #2 apply still. Not sure what to do to move this issue forward though.

mgifford’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Needs work » Postponed
mgifford’s picture

Issue tags: +Drupal.announce
mgifford’s picture

mgifford’s picture

Issue tags: +aria-live
mgifford’s picture

Status: Postponed » Needs review

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mgifford’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch no longer applies.

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988
Status: Needs work » Active
deepakaryan1988’s picture

Assigned: deepakaryan1988 » Unassigned
Status: Active » Needs review
StatusFileSize
new1.39 KB

Rerolled #2

jessebeach’s picture

Status: Needs review » Needs work

The patch by @deepakaryan1988 in #13 fixes headings and adds a title. It's an improvement on the current code.

But the patch doesn't really address the ask in this issue. @deepakaryan1988, would you mind opening a new issue and associating your patch with it? That way we can get it in now rather than waiting for further improvements here?

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

manuel garcia’s picture

Issue tags: -Needs reroll
Everett Zufelt’s picture

As a blind user who configures Views with a screen-reader, I like the idea here. I think we really don't need a re-roll right away, but that we need to define the solution.

A few thoughts:

1. Reading the entire diff on every change to the View config would be a bit too much information.
2. Personally, if I want to see how the view has changed, I navigate to the preview and review.
3. There is likely some amount of information that sighted users "scan" for, rather than read, in order to assess the change to the View. A couple of items suggested here already are: that the preview has updated, number of results, and addition / removal of fields.
4. I like how Expedia announces that results are ready / a filter has been applied.

Perhaps a message like the following would be helpful?

"Preview updated. 20 of 243 results are displayed."

Or,

"Preview updated. 20 of 243 results are displayed. The field: Content: Title, has been removed."

andrewmacpherson’s picture

Thanks for these suggestions Everett.

"Preview updated. 20 of 243 results are displayed. The field: Content: Title, has been removed."

I think this one strikes a good balance.

mgifford’s picture

Sounds good to me. We just need to build that summary now.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mgifford’s picture

I don't think this falls as a WCAG failure, but definitely a useful addition.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.