aria-pressed attribute isn't updated correctly.

Created on 4 October 2019, over 5 years ago
Updated 30 January 2023, over 2 years ago

Spin-off from #3066954: Admin toolbar not usable with latest versions of JAWS due to mis-use of aria-owns .
Also noted in Decouple tour triggering from the toolbar Needs work .

Problem/Motivation

Most of the buttons in toolbar module have an aria-pressed attribute, initialized to false. When pressing them, the state of the UI changes but the value of aria-pressed doesn't get updated. Instead of changing between true and false to reflect the UI, it is always false. Assistive technology therefore always reports these buttons as "off" or "not pressed".

Affected buttons: toolbar buttons which reveal trays, and the tour module button.
Note: the edit button behaves correctly!

Proposed resolution

Make the aria-pressed property actually work.

It may be to do with using jQuery.prop() when we should be using jQuery.attr(). The ARIA attributes are not properties as defined in HTMLElement interfaces.

Remaining tasks

Patch.
Tests - can watch this with FunctionalJavascript test, simulate clicks.

User interface changes

No visual design changes. Corrects faulty handling of a dynamic ARIA state.

API changes

None.

🐛 Bug report
Status

Needs work

Version

10.1

Component
Toolbar 

Last updated 8 days ago

  • Maintained by
  • 🇫🇷France @nod_
Created by

🇬🇧United Kingdom andrewmacpherson

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024