Add a percentage suffix to the position option

Created on 20 June 2025, 4 days ago

Problem/Motivation

The position setting on admin/config/user-interface/skipto is missing a clearly visible unit.

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

The issue was at ๐Ÿ“Œ Drupal Usability Meeting 2025-06-20 Active to add a

Steps to reproduce

Proposed resolution

@benjifisher suggested to add a suffix with a % sign to the position field

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
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia jeeva r

    Im working on this issue

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia jeeva r

    I have found the solution for add % suffix to position field..

  • Pipeline finished with Failed
    about 22 hours ago
    Total: 163s
    #528983
  • Pipeline finished with Success
    about 22 hours ago
    Total: 155s
    #528989
  • Pipeline finished with Success
    about 22 hours ago
    Total: 150s
    #528995
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia divya.sejekan

    Applied MR!7 , Patch gets applied cleanly.
    % is displayed now as a suffix to Example Number Field.

    Steps Followed :
    1. Install drupal, Install Skip to module
    2. Go to /admin/config/user-interface/skipto

    RTBC++

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    Thanks for the initial work! I've taken a look at MR7 and i am not sure if using javascript for adding a suffix is the right solution here. i guess the suffix itself could be solveable simply with plain php and the field api. by adding something like

    '#field_suffix' => $this->t('percent', [], ['context' => 'skipto']),

    to

    $form['buttonSettings']['positionLeft'] = [

    would solve things (except the wrong label for the number field, but that has to be fixed in ๐Ÿ› Improve the microcopy on the settings page Active - still havent had the capacity to work on it). imho it is always preferable to go with to write something out instead of using a symbol like % for screenreader users. but talking of screenreader users, i've tested the solution in MR7 as well as my suggested one and neither is being announced when the numbers input gets into focus. I gotta do some more research if that is maybe a shortcoming in core in general. I'll set the issue back to NW.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia jeeva r

    @rkoller, thanks for the info, let me try this

  • Pipeline finished with Running
    42 minutes ago
    #529791
  • Pipeline finished with Canceled
    42 minutes ago
    #529788
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia jeeva r

    @divya.sejekan, thanks reviewing my previous code.. Please review this changes too. I had attached the reference image for review the UI changes.

Production build 0.71.5 2024