Accessibility improvements: titles for buttons don't get read out on Voiceover

Created on 25 April 2023, over 1 year ago
Updated 4 May 2023, over 1 year ago

Problem/Motivation

When using a screen reader on a Mac (VoiceOver), some of the labels for buttons (e.g. the list / tiles toggle) don't get read out. Also some other labels are read out multiple times.

Steps to reproduce

  1. Open an editor page with the module enabled, and open the modal
  2. Using VoiceOver on a Mac, navigate through the form to the 'tiles / list' toggle
  3. Expected: The label is read out, e.g. "Display paragraphs as a list"
  4. Actual: Only the button text is read out, e.g. "list"

Additionally:

  1. Navigation to the 'Include description when searching' checkbox
  2. This label is read out multiple times, which can be confusing for users

Proposed resolution

  • For the display toggles, use `aria-label` instead of `title` for a more consistent screenreader experience
  • For the multiple instances of the 'Include description when searching' toggle, remove the title and the aria-label as they are redundant
  • Remaining tasks

    • Change to use aria-label
    • Remove duplicate titles
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom psebborn

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

Comments & Activities

Production build 0.71.5 2024