Remove hover text from time element in widget

Created on 30 January 2025, 6 days ago

Problem/Motivation

In the related UX/A11y issues, it is proposed to remove the hover text from src/Element/OfficeHoursDatetime.php , that gives more precise information about the time increment.
(In Drupal core, this is also removed)

Steps to reproduce

Proposed resolution

diff --git a/src/Element/OfficeHoursDatetime.php b/src/Element/OfficeHoursDatetime.php
index 3ce36d7e480b663ab80a5632f4ed3a8c9cd9badd..88b6254119aa668f4d42020e0543af1047dd9fff 100644
--- a/src/Element/OfficeHoursDatetime.php
+++ b/src/Element/OfficeHoursDatetime.php
@@ -92,15 +87,6 @@ class OfficeHoursDatetime extends Datetime {
 
     // Fix the convention: minutes vs. seconds.
     $element['time']['#attributes']['step'] = $increment * 60;
-    // Add a more precise hover text.
-    $element['time']['#attributes']['title'] = \Drupal::translation()->formatPlural(
-      $increment,
-      'Time, with an increment of one minute (e.g. @format)',
-      'Time, with an increment of @count minutes (e.g. @format)',
-      [
-        '@count' => $increment,
-        '@format' => $time_example,
-      ]);
     return $element;
   }

Remaining tasks

Explain why this is better for UX.

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code - widget

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024