Reduce the width of the search box

Created on 11 May 2024, 6 months ago
Updated 12 July 2024, 4 months ago

Problem/Motivation

The search box can become too long since it adjusts to the viewport of the browser window. On a 36" monitor and the browser window extended to the maximum of the screen you are able to enter up to 472 characters (and more). From a readability and cognition standpoint the line length shouldnt exceed ~80 characters (WCAG2.2. SC 1.4.8). In a similar vein was the recommendation from the folks at Smashing Magazine in the Search UX webinar. You should aim for 60+ characters on desktop and around 45 characters on mobile for the search box width.

Steps to reproduce

Proposed resolution

Reduce the maximum width of the search field or make it even a fixed width?

๐Ÿ“Œ Task
Status

Postponed

Version

1.0

Component

User experience

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.

  • 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
  • First commit to issue fork.
  • Merge request !481reduce maxlength according to screen size โ†’ (Open) created by tabestan
  • Pipeline finished with Failed
    6 months ago
    Total: 452s
    #170781
  • Pipeline finished with Success
    6 months ago
    Total: 506s
    #170788
  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance tabestan Sargentville, Maine

    This proposed solution reduces the search box maxlength to 80 characters on desktop and 45 characters on screens smaller than 768px.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States r.aubin

    @rkoller, was the intent of this issue to reduce the allowable character length of this input or the visible width of the input field?

    Adjusting the width of the input based on viewport size so it doesn't end up really wide would be nice, but is a separate thing from the allowable input character length. Also, the WCAG section you referenced pertains to blocks of text, not form inputs, so I don't think that should apply here and the input's maxLength shouldn't be different for users with different viewport sizes.

    The open MR that @Tabestan put together addresses just the maxLength not the input's physical size.

  • First commit to issue fork.
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India

    I have updated the physical width of the search box for desktop and mobile device as 80ch and 45ch respectively for desktop and mobile devices.

  • Pipeline finished with Failed
    5 months ago
    Total: 416s
    #200646
  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Kanchan Bhogade

    MR is failing and in the Issue summary also MR is "Open Failed Pipeline"

    Moving ti "needs work"

  • Pipeline finished with Canceled
    5 months ago
    Total: 91s
    #200663
  • Pipeline finished with Success
    5 months ago
    Total: 524s
    #200664
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia gauravvvv Delhi, India

    MR is passing the tests now.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada zetagraph

    @tabestan, @rkoller we are rearranging things visually in this issue ๐Ÿ“Œ Improve the categories filter type in context to the rest of the filter component ui Fixed

    The search box is going to always span the full width of the browser window. There is no need to limit the box width or the character count as far as I can tell.

    CC: @raubin, @gauravvvv

  • Status changed to Postponed 4 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisfromredfin Portland, Maine
Production build 0.71.5 2024