Remove main-only option from heading checkbox list and add radio buttons instead

Created on 20 June 2025, 4 months ago

Problem/Motivation

at the moment the main-only option is part of the headings checkbox list. strictly speaking main-only is not a heading, but a setting with the help of which the user is able to define the scope of which headings to show. it is also sort of unclear, if it is only necessary to check main-only and all the heading included will automatically be displayed or if you still have to set which headings should be shown for the main element.

*The issue is based on the discussion with @benjifisher in todays usability meeting: 📌 Drupal Usability Meeting 2025-06-20 Active

Steps to reproduce

Proposed resolution

Remove the main-only checkbox and add a radio button with two option right after the heading checkbox list. one label could say something like "within the DOM" while the other says something like "within the main element". The exact wording can be decided on when a MR is in place.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

User interface

Created by

🇩🇪Germany rkoller Nürnberg, Germany

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @rkoller
  • 🇩🇪Germany rkoller Nürnberg, Germany
  • 🇮🇳India kulpratap2002

    Working on this.

  • Pipeline finished with Failed
    4 months ago
    Total: 580s
    #529081
  • Pipeline finished with Success
    4 months ago
    Total: 136s
    #529087
  • 🇩🇪Germany rkoller Nürnberg, Germany

    Thank you for working on the issue! I've tested MR8, two observations:

    1) It looks like the set radio buttons has no effect at all. no matter if i select main-only or full-dom, each time all the headings of the entire dom are displayed in skipto

    2) the label for the first radio button (Only within the <main> element) is broken, main is being hidden and you only see

    Only within the
    element
    

    probably no need to use angle brackets. will have to think about the wording

  • Pipeline finished with Failed
    2 months ago
    Total: 141s
    #573337
  • 🇩🇪Germany rkoller Nürnberg, Germany

    Fixed the problem. It couldnt have worked to simply adding the value of the radio button to the $config_export array. instead you have to check if the radio button has selected the option for within the main element and then append main-only to the headings object and the default radio button setting was also missing from the settings.yaml in the install folder. now everything is functional. but i'll postpone the issue on the micro copy issue [#3516073 . that one changes that much in the code that also the changes within this issue become tricky to rebase i suppose. and also the radio button microcopy needs some more refinement. but the microcopy issue should be solved first.

Production build 0.71.5 2024