The page title "edit tour" is too generic

Created on 20 August 2024, 4 months ago
Updated 6 September 2024, 4 months ago

Problem/Motivation

If you get to one of the edit tour pages the page title says Edit tour | [site name] and the h1 just Edit tour. If you have for example admin/config/user-interface/tour/manage/admin_content and admin/config/user-interface/tour/manage/extend open in tabs and you rely only on the announcement of a screenreader you have to first find the actual tour name, or know that the actual tour name can be found in the first field.

Steps to reproduce

  • go to admin/config/user-interface/tour/manage/admin_content
  • go to admin/config/user-interface/tour/manage/extend

Proposed resolution

Change the page title to Edit [tour name] tour | [site name]
Change the h1 to Edit [tour name] tour

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

User interface

Created by

🇩🇪Germany rkoller Nürnberg, Germany

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

  • Issue created by @rkoller
  • Assigned to smustgrave
  • Status changed to Needs review 4 months ago
  • 🇺🇸United States smustgrave

    Try this

  • 🇩🇪Germany rkoller Nürnberg, Germany

    Looks good! the only minor nitpick i've just noticed. would it make sense to wrap the tour name in an em tag in the h1? so it is in line with the pattern used on for example content types (admin/structure/types/manage/article), block types (admin/structure/block-content/manage/basic) and so on?

  • 🇺🇸United States smustgrave

    Done

  • Status changed to Needs work 4 months ago
  • 🇩🇪Germany rkoller Nürnberg, Germany

    the em tags are getting rendered.

  • Status changed to Needs review 4 months ago
  • 🇺🇸United States smustgrave

    Oops

  • Status changed to Needs work 4 months ago
  • 🇩🇪Germany rkoller Nürnberg, Germany

    now the order looks off:

    instead of
    $form['#title'] = $this->t('Edit tour <em>%label</em>', ['%label' => $this->entity->label()]);
    better
    $form['#title'] = $this->t('Edit <em>%label</em> tour', ['%label' => $this->entity->label()]);

  • 🇺🇸United States smustgrave

    Following what node and block content do

  • 🇩🇪Germany rkoller Nürnberg, Germany

    oh i now see and understand what you are referring to. so under the top level menu item content the order is "edit [entity type] [entity name]" that is what you were referring to, while under the top level menu item structure it is the other way around "Edit [entity name] [entity type]" which is what i was referring to. the latter, front loading, is in the context of readability the preferable and recommended choice. a few months ago we've ping ponged about that very topic between the ux and a11y meetings. a summary and the outcome of those discussions can be found in this followup issue that picked up some of the outcomes: https://www.drupal.org/project/drupal/issues/3370946#comment-15203381 🐛 Page title should contextualize the local navigation Needs work and i've also created a google doc comparing all h1s and page titles across drupal admin ui https://docs.google.com/spreadsheets/d/1XhQtXZA1JCwa8qnE3vp8gyW8HJT8zZxg... . and that front loading pattern is something i have strong opinions on. was a good reminder to revisit the following follow up issue 📌 Refine the page title if possible Active .

    Cuz the problem i have with the "edit tour custom block edit" example. you start with "edit" then you get way more "general" and then you get more specific again with the actual title. the context, that you are within a tour, you already know before, since you got onto that edit page from the tour list page.
    while the other way around, first you know you are on an edit page then you know what document you are editing, the "custom block edit" page and then you get to know the context that it is a tour. screenreader users as well as sighted users can jump off at any time with this pattern. screenreader users skim with their ears sighted users with their eyes. with "edit tour custom block edit" you first have to scan edit (the action) then tour (the context) and then finally starts part of interest. while with "edit custom block edit tour" you start with edit then custom .... maybe that is already enough, the person knows they are in custom block edit... while if they are uncertain about the context they can still go on for reassurance that they are within a tour. (in case there are several open tabs for example or they have a small working memory).

    both approaches, the one you suggested and the one i suggested would be sort of consistent with the rest of drupal at this point, but personally i hope it gets unified on the front loaded approach sooner or later.

  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • 🇩🇪Germany rkoller Nürnberg, Germany

    thank you! looks good to me. and this issue is a good reminder to revisit the issue making the h1s and page title naming patterns consistent across the entire admin ui.

  • Status changed to Fixed 4 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024