Add title attributes to buttons for Dragon users

Created on 20 July 2013, almost 11 years ago
Updated 1 April 2023, about 1 year ago

Problem/Motivation

Drupal has several buttons or links where the text is visibly hidden and replaced with a small icons. This poses challenges to speech recognition users because they don't know what to say to trigger those commands. For buttons or links where the text is visible (e.g., "Home" or "Menu") speech rec users can simply say "Click Home" or "Click Menu". For icons without text, they can guess if the names of the controls are intuitive, but in Drupal's case they aren't.

Steps to reproduce

Proposed resolution

  • Add a title attribute to each control in order to reveal the text for that control to users when they hover. They'll need to use mouse commands at least once to discover the text, but subsequently they can use that text in a voice commands, which will be much more efficient.
  • Consider using more intuitive text. For example, rather than "Vertical orientation" and "Horizontal orientation" consider using "Move menu to left" and "Move menu to top"
  • Use larger icons so they're easier targets

Remaining tasks



Review
Commit

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Original Post

Problem/Motivation

Drupal 8 has several buttons or links where the text is visibly hidden and replaced with a small icons. This poses challenges to speech recognition users because they don't know what to say to trigger those commands. For buttons or links where the text is visible (e.g., "Home" or "Menu") speech rec users can simply say "Click Home" or "Click Menu". For icons without text, they can guess if the names of the controls are intuitive, but in Drupal's case they aren't.

Alternatively they can operate their mouse by voice (mouse left, mouse up, faster, faster, faster, stop, mouse down, mouse right, stop, click) but this is very cumbersome and if targets are small (which many are in Drupal) it's hard to stop at precisely the right position.

Proposed resolution

  • Add a title attribute to each control in order to reveal the text for that control to users when they hover. They'll need to use mouse commands at least once to discover the text, but subsequently they can use that text in a voice commands, which will be much more efficient.
  • Consider using more intuitive text. For example, rather than "Vertical orientation" and "Horizontal orientation" consider using "Move menu to left" and "Move menu to top"
  • Use larger icons so they're easier targets

Examples of icons that require fixing:

Top left corner, pencil icon: <button aria-pressed="false" role="button" class="icon icon-edit">Edit</button>

Secondary pencil icons such as:

<button type="button" class="trigger focusable" aria-pressed="false">open  configuration options</button>

And this one, next to search:

<button type="button" class="trigger focusable" aria-pressed="false">open Search configuration options</button>

The small "X" at top right corner of overlay:

<a aria-controls="overlay-content" role="button" class="overlay-close" href="#" id="overlay-close">
  <span class="visually-hidden">Close overlay</span>
</a>

The icons for swapping vertical and horizontal orientation of the secondary toolbar menu:

<button type="button" class="icon icon-toggle-vertical" value="vertical">Vertical orientation</button>

And:

<button type="button" class="icon icon-toggle-horizontal" value="horizontal">Horizontal  orientation</button>

The Small + or - icon (shortcut.png) that appears next to the main heading on various admin pages is unique in that it has accompanying text, which seems to be serving a function similar to having a title attribute:

<span class="icon">Add or remove shortcut</span>
<span class="text">Add to <em class="Placeholder">Default</em> shortcuts</span>

The text in the second span appears visible on hover. Why is this technique used for this icon only? I think it's ok, and speech rec users can use either text in their voice command (i.e., "Click add or remove shortcut" and "Click add to Default shortcuts" both work). However, it might be confusing if the text in the second span is always changing. Since that's the text that's visibly exposed users will discover that in one context, but if it changes dynamically the same command they've learned in one context might not work in another context.

📌 Task
Status

Needs work

Version

10.1 ✨

Component
Markup  →

Last updated 4 days ago

No maintainer
Created by

🇺🇸United States terrill

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.

  • Needs accessibility review

    Used to alert the accessibility topic maintainer(s) that an issue significantly affects (or has the potential to affect) the accessibility of Drupal, and their signoff is needed (see the governance policy draft for more information). Useful links: Drupal's accessibility standards, the Drupal Core accessibility gate.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • Status changed to RTBC over 1 year ago
  • 🇫🇷France DuaelFr Montpellier, France

    Looks good. Fixes the issue.
    Given the length of the remaining fix, I don't have much more to say ;)
    Thansk!

  • Status changed to Needs review about 1 year ago
  • 🇫🇮Finland lauriii Finland

    This was proposed almost 10 years ago. I think it would be great if someone could check if this is still what we should be doing. 😇

  • 🇫🇮Finland lauriii Finland

    Wait, I looked at the patch and I'm confused. Maybe what we actually need is a title + brief issue summary update? It totally makes sense that the button should have text, but that's not what I was expecting based on the title. 🤯

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Think this does need some more thinking out.

    At first I was actually wonder if it's needed now. I see the button has text in it so it should be fine.

    But I installed the examples module which adds a tab to the toolbar. And that has an empty button for switching between vertical/horizontal..

Production build 0.69.0 2024