a11y: <label> text missing for buttons

Created on 11 September 2024, 17 days ago

Problem/Motivation

The inserted <label> markup does not contain any string, which is bad for accessibility.

Steps to reproduce

Create button block, look at source code.

Proposed resolution

Add the button description text as label text as well.
Adding another field in the config settings to allow the definition of a CSS class to be set for the label also seems necessary. Bootstrap themes would most likely set "sr-only" there, so the labels get hidden for non-screenreader users.

User interface changes

Added configuration option for CSS class to be used.

🐛 Bug report
Status

Active

Version

2.6

Component

Code

Created by

🇦🇹Austria tgoeg

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